Cookiecutter is a command line utility which constructs code from a set of Jinja2 templates. It can use these templates directly from a Github repository as well, prompting for configuration values as needed. It's fairly simple, but I can see it becoming one of those indispensable tools.
I've been playing around with using it to automate Django app creation with loads of the common boilerplate that I'd often end up doing. Currently it creates an app based around a model with:
It was fairly straightforward, but with a few minor things worth noting:
Just the parts between the {% endraw %}..{% raw %} are parsed by Jinja - the rest we want to be viewed as regular text intil it finds itself in the Django project being run.
cookiecutter 0.7 is now on PyPI so you can use the stable version.
The template I built is over on github. If you want to use it in your project, first, install cookiecutter, along with the packages required to run the bits in the generated Django project (django-vanilla-views, webtest, floppyforms). These are all in a requirements file, so you can just do:
Run cookiecutter, armed with this template. Follow the prompts for the app_name and model_name you'd like to use. The app will be created as <app_name> under the current directory. Don't forget me saying that it will overwrite existing files without warning you if you already have an app of the same name, so make sure your code is checked in or backed up.
Add the newly generated app, and floppyforms, to INSTALLED_APPS in your settings.py:
Edit the models.py for the new app with the fields you'd like to use.
Syncdb to set up your new model in the DB.
If you already have a base.html template you'll need to ensure there's a Django content block named "content" for anything to show up. There's a default base.html included otherwise.
You'll probably want to fork my templates and create your own however you like your Django projects set up, but any pull requests for things which may be useful more generally would be welcome as well.