Django Chuck: your powerful project punch button - Bastian Ballmann and Lukas Bünger

Tags: django, djangocon

Don’t mind the name. Django-chuck just throws your Django projects right in place, just the way you want it.

They have a lot of micro sites. Manual project setups take a lot of time and are error-prone. Same for configuring WSGI and the hosting environment. Often you won’t setup a small test site just because it takes so much effort. So what about a tool that helps them?

They looked around for good modular template structures, but didn’t find it. Pinax has a script, but it is monolythic. And most of what’s available addresses project creation only.

Django chuck has a config file for a base directory for virtualenvs, for instance. Chuck has a syntax that looks like:

chuck create_project <prefix> <name> [modules] -a [pip modules]

So for instance to create a django-cms project with an nginx setup and jenkins integration:

chuck create_project ni djangocon django-cms,test,nginx

This creates a project for you. It contains folders per part, like settings/, fabfile/, hosting/.

Another feature is that it can retrofit an existing project with such a django-chuck structure. You can call it directly with a git URL :-)

Once you’ve set it up this way, you can use the chuck_setup.py script that chuck placed in the main directory. It contains metadata like a pointer at your settings file name.

Nice: that requirements directory has a separate requirements file per part that you installed (the django-cms,test,nginx part of the example commandline) with prepend/append instructions from which chuck generates the real requirements.txt.

You can extend chuck with your own custom parts. Part of this is handled by specially-named directories like the requirements/ one above, with instructions for chuck, like #!chuck_extends requirements/requirements.txt. But there’s also an optional python file where you can place post_build()-like functions. Lots of customization is possible.

If you’ve made custom extensions, please send them to Bastian or Lukas so that they can possibly include them.

The documentation is at http://django-chuck.readthedocs.org/ .

Photo & Video Sharing by SmugMug
 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):