Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

buildcache : build the site cache

Build the files in your site cache and run pm collectstatic.

pm buildcache

Usage

For example:

$ pm buildcache -b

This command also defines -b or --batch as aliases for --noinput. The advantage is that after running pull.sh you can type pm buildcache -b rather than waiting for pm buildcache to finish and then typing pm collectstatic --noinput.

Options:

--noinput
--batch
-b

Do not prompt for user input of any kind.

All code snippets on this page (lines starting with >>>) are being tested as part of our development workflow. The following snippet initializes a demo project to use throughout this page.

>>> import lino
>>> lino.startup('lino_book.projects.min1.settings')
>>> from lino.api.doctest import *
>>> from atelier.sheller import Sheller
>>> shell = Sheller(settings.SITE.project_dir)
>>> shell("django-admin buildcache --help")
...
usage: django-admin buildcache [-h] [-b] [--version] [-v {0,1,2,3}]
                              [--settings SETTINGS] [--pythonpath PYTHONPATH]
                              [--traceback] [--no-color] [--force-color]
                              [--skip-checks]

options:
  -h, --help            show this help message and exit
  -b, --batch, --noinput
                        Do not prompt for input of any kind.
  --version             Show program's version number and exit.
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions.
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.
  --skip-checks         Skip system checks.
buildcache

This command calls the Renderer.build_site_cache method.