Skip to content

abstract-open-solutions/djc.recipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

This recipe has been deprecated in favor of djc.recipe2. If you are starting a new project, don't use this package, use djc.recipe2. This package might see minor bug fixes to keep existing buildouts running, but it won't gain new features.

This recipe allows you to setup a Django project through zc.buildout.

The main scope of the recipe is to abstract out the settings.py file, allowing settings to reside inside the buildout instead of having them reside into code (leading to an awkard handling of the same in respect to versioning, for example). The settings.py file is generated by a template, either the default one, the default one and a user extension, or a totally new one.

The template uses the Tempita_ templating system.

The most basic usage of this recipe is as follows:

[buildout]
parts = django

[django]
recipe = djc.recipe
project = my.project

Where my.project is an importable package containing a urls module and a templates directory.

As you see, very few options are specified here: the defaults are used to build up the settings.py file.

Of course, real examples tend to be slightly more complex: see Options_, `Default template options`_ and `Example usage`_ for more details.

The README.txt located within the package also acts as main doctest.

To run the tests, check out the source, and then bootstrap and run the buildout:

$ python bootstrap.py
$ bin/buildout

Then you can run the tests using:

$ bin/test