Settings variables

Configuration options for your settings.py.

BUILD_DIR

BUILD_DIR

The location where you want the flat files to be built.

BUILD_DIR = '/home/you/code/your-site/build/'

# I like something a little snappier like...
import os
BUILD_DIR = os.path.join(__file__, 'build')

BAKERY_VIEWS

BAKERY_VIEWS

The list of views you want to be built out as flat files when the build management command is executed.

BAKERY_VIEWS = (
    'myapp.views.ExampleL­istView',
    'myapp.views.ExampleDe­tailView',
    'myapp.views.MyRSSView',
    'myapp.views.MySitemapView',
)

AWS_BUCKET_NAME

AWS_BUCKET_NAME

The name of the Amazon S3 “bucket” on the Internet were you want to publish the flat files in your local BUILD_DIR.

AWS_BUCK­ET_­NAME = 'your-buck­et'

BAKERY_GZIP

BAKERY_GZIP

Opt in to automatic gzipping of your files in the build method and addition of the required headers when deploying to Amazon S3. Defaults to False.

BAKERY_GZIP = True

GZIP_FILE_MATCH

GZIP_FILE_MATCH

An uncompiled regular expression used to determine which files to have the ‘Content-Encoding: gzip’ metadata header added when syncing to Amazon S3. Defaults to include all .html, .xml, .css, .js and .json files.

Only matters if you have set BAKERY_GZIP to True.

# defaults to all .html, .xml, .css, .js and .json files
GZIP_FILE_MATCH = '(\.html|\.xml|\.css|\.js|\.json)$'