Django and buildout
Too many buildout recipes for Django available in Pypi
There are several buildout recipes for Django in Pypi. From my point of view, there are too many of them.
Why so many? I guess several developers were not satisfied by the existing ones and created their own.
So is there any de facto standard? I don't know by now.
When I look at the description of the recipes, one thing worries me: none of them seems simple (the KISS way). They all do several things.
The Buildout recipe for Django I'd like
I would like to find a simple buildout recipe for Django. What does "simple" means for me?
Install Django as a dependency
I don't need any Django specific recipe here. I can use zc.recipe.egg. It is enough to have Django in the Python path.
Use django-admin.py
Buildout downloads and installs Django. Great. But where? What is the path to the django-admin.py script?
Buildout champions will tell me very fast. But I don't want to care about it. I am looking for a kind of bin/django-admin.py shortcut.
Note: I wonder if we can achieve this with a zc.recipe.egg:script part.
Use project's manage.py
Once I am working on a project, I want to be able to call the project's manage.py script. A kind of bin/manage.py shortcut would be great.
What if the buildout directory hosts several projects? A command like "bin/django-manage PROJECT ..." could be useful.
Note: I wonder if using a buildout environment for several projects is a good idea.
More?
No. That's enough for a minimal buildout recipe for Django.
Other tools
As I said before, the existing buildout recipes for Django do several things. From my point of view, these functionalities should be packaged as separate recipes or modules.
Paster templates
When you want to initialize an new Django project, using templates is a good practice. But you do not need a specific recipe to perform it.
As an example, you can package paster templates and add them to the list of eggs.
I guess there is a way to use something like "bin/paster create ..." in a buildout environment.
Tests
Several buildout recipes for Django install some bin/test utility. Is "bin/manage.py test" not enough?
If you want to use a custom test runner, I guess some buildout recipes for nose exist.
Servers
If we have access to a project's manage.py, we can run a server.
Apache, Nginx, Paster, Gunicorn... there are lots of ways to embed a Django project in a server. A so many configurations for each of them...
So, tools to "configure and run" a server are welcome, but they should be packaged separately.
The buildout recipe I'm using
I am currently using djangorecipe. I have been using it for some time now, and haven't seriously tried another one yet.
Currently it fits my (basic) buildout usage.
Django packages shows some more active (less used?) projects. As an example, the djangoprojectrecipe seems interesting. Even if I think that the "wsgi", "fcgi" and "logfile" options are inappropriate here.