About cached temporary data¶
When you run a Lino application, Lino needs a place for storing temporary files like the SQLite database file, static files and dynamically generated files of miscellaneous types like .js, .pdf, .xls.
In a normal development environment this is simply below the project directory,
and those cache files are simply listed in the
But e.g. on Travis CI it is not allowed to write to the code repository.
In such situations you create an empty directory where you have write
permission, and then set the
LINO_CACHE_ROOT environment variable to
point to it.
The safest place for this directory is below your virtual environment:
$ cd ~/virtualenvs/a $ mkdir lino_cache
And then to add the following line to your
Don't forget to re-run the script in order to activate these changes. You can verify whether the variable is set using this command:
$ set | grep LINO
If an environment variable
LINO_CACHE_ROOT is set, then the cached
data of a Lino project (e.g. the
default.db files and the
media directory) are not written into the file tree of the source code
repository but below the given directory.
For example you can add the following line to your
Note that the path should be absolute and without a
When to update your static files¶
(This section is probably obsolete. Don't read.)
$ python manage.py collectstatic
Theoretically you need to do this only for your first local Lino
project, but you should run
after a Lino upgrade
when you changed your
if you use a plugin with static files for the first time
The following built-in plugins have static files:
You can run the
collectstatic command as often as you want.
So if you are in doubt, just run it again.
Some attributes of your
which are related to this topic:
Some Django settings related to this topic:
The root directory where static files are to be collected when the collectstatic command is run. See Django doc.
This is not needed as long as you work on a development server because the developement server serves static files automagically.
If this is not set, Lino sets an intelligent default value for it as follows.