Files changed (8)
To create these configuration files in various deployments, the `generate_config` task has been defined in `project_dir/libs/templatecfg.py`. This takes a list of configured templates from the pavement options, and renders them out to a given `etcs/DEPLOYMENT` directory which you can then symlink `etc/` to. To do this, just run:
You can also specify a `--force` option which will tell `generate_config` to overwrite any existing configuration files which exist at that location.
This will download all the required packages from PyPI, initialize a virtualenv and make the necessary directories throughout your project and site. Take a look through the `options` section of the `pavement.py` file in the project and make sure all the settings are correct, then run:
To generate all the configuration files for a deployment called `development`. Now edit `etcs/development/lighttpd.conf`, and uncomment the lines with `server.bind` and `server.port` so that the server runs on localhost, port 8001 (otherwise you would need to run lighttpd as root).
to activate the virtualenv, and let Django know that you're using the `development` settings. Then run:
to create your SQLite database (which will be in `db/development.sqlite` under your site directory). You can now run:
to start Supervisor, which will run an instance of lighttpd with five FastCGI worker processes on port 8001. To stop Supervisor, run:
In order to integrate more closely with Jinja2, Django-in-a-Box includes [DjanJinja][DjanJinja], a Django application which provides several shortcuts and wrappers to make using Jinja2 feel more native within Django. To get started straight away, write your templates using Jinja2, putting them in the same location as usual. To render them from within your views:
The [Supervisor Manual][svd-manual] provides far better documentation than I can hope to provide here. I can, however, offer some good recipes for Django-in-a-Box:
That's usually a signal that Supervisor is not running. Check the `site_dir/log/supervisord.log` file for more information if this persists after running `supervisord` again.