Permalink
Fetching contributors…
Cannot retrieve contributors at this time
110 lines (63 sloc) 2.78 KB

Management commands

Custom Django management commands for this library that help make things happen.

build

Bake out a site as flat files in the build directory, defined in settings.py by BUILD_DIR.

By default, this wipes the build directory if it exists, then builds any static files in the STATIC_ROOT to the STATIC_URL, any media files in the MEDIA_ROOT to the MEDIA_URL and all pages generated by the buildable views listed in BAKERY_VIEWS.

As a small bonus, files named robots.txt and favicon.ico will be placed at the build directory's root if discovered at the STATIC_ROOT.

Defaults can be modified with the following command options.

$ python manage.py build

View names passed as arguments will override the BAKERY_VIEWS list.

$ python manage.py yourapp.views.DummyL­istView

buildserver

Starts a variation of Django's runserver designed to serve the static files you've built in the build directory.

$ python manage.py buildserver

publish

Syncs your Amazon S3 bucket to be identical to the local build directory. New files are uploaded, changed files are updated and absent files are deleted.

$ python manage.py publish

unbuild

Empties the build directory.

$ python manage.py unbuild

unpublish

Empties the Amazon S3 bucket defined in settings.py.

$ python manage.py unpublish