Custom Django management commands for this library that help make things happen.
Bake out a site as flat files in the build directory, defined in settings.py by
By default, this wipes the build directory if it exists, then builds
any static files in the
STATIC_ROOT to the
any media files in the
MEDIA_ROOT to the
all pages generated by the buildable views listed in
As a small bonus, files named
favicon.ico will be placed
at the build directory’s root if discovered at the
Defaults can be modified with the following command options.
Specify the path of the build directory. Will use
Skip deleting and recreating the build directory before building files. By default the entire directory is wiped out.
Skip collecting the static files when building.
Skip collecting the media files when building.
$ python manage.py build
View names passed as arguments will override the
$ python manage.py yourapp.views.DummyListView
Starts a variation of Django’s runserver designed to serve the static files you’ve built in the build directory.
$ python manage.py buildserver
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.
Specify the AWS bucket to sync with. Will use settings.AWS_BUCKET_NAME by default.
Specify the path of the build directory. Will use settings.BUILD_DIR by default.
Force a re-upload of all files in the build directory to the AWS bucket.
Provide output of what the command would perform, but without changing anything.
Keep files in S3, even if they do not exist in the build directory. The default behavior is to delete files in the bucket that are not in the build directory.
$ python manage.py publish
Empties the build directory.
$ python manage.py unbuild
Empties the Amazon S3 bucket defined in
$ python manage.py unpublish