Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use <strong><a href="http://pypi.python.org/pypi/djangorecipe" rel="nofollow noreferrer">djangorecipe</a></strong> to manage your project</p> <ul> <li>If you're writing a new app, this recipe makes testing it outside of a project really easy</li> <li>It allows you to manage dependencies for a project (e.g. what version of some app it should depend on)</li> </ul> <p>All you have to do to get started is this:</p> <ol> <li>Create a folder for your new website (or library)</li> <li><p>Create a buildout.cfg with following content in it:</p> <pre><code> [buildout] parts=django [django] recipe=djangorecipe version=1.1.1 project=my_new_site settings=development </code></pre></li> <li>Grab a bootstrap.py to get a local installation of buildout and place it within your directory. You can either go with the <a href="http://www.google.at/search?q=buidlout+bootstrap.py&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a" rel="nofollow noreferrer">official one</a> (sorry, Markdown didn't like part of the full link :-/ ) or with one that uses distribute instead of setuptools as described by <a href="http://reinout.vanrees.org/weblog/2009/10/15/distribute-works-with-buildout.html" rel="nofollow noreferrer">Reinout van Rees</a>.</li> <li><code>python bootstrap.py</code> (or <code>python bootstrap_dev.py</code> if you want to use distribute).</li> <li><code>./bin/buildout</code></li> </ol> <p>That's it. You should now have a new folder "my_new_site", which is your new django 1.1.1 project, and in ./bin you will find the <code>django</code>-script which replaces the manage.py on a normal installation. </p> <p>What's the benefit? Let's say you want to use something like django-comment-spamfighter in your project. All you'd have to do is change your buildout.cfg to something like this:</p> <pre><code> [buildout] parts=django [django] recipe=djangorecipe version=1.1.1 project=my_new_site settings=development eggs= django-comments-spamfighter==0.4 </code></pre> <p>Note that all I did was to add the last 2 lines which say, that the django-part should also have the django-comments-spamfighter package in version 0.4. The next time you run <code>./bin/buildout</code>, buildout will download that package and modify ./bin/django to add it to its PYTHONPATH.</p> <p>djangorecipe is also suited for deploying your project with mod_wsgi. Just add the <code>wsgi=true</code> setting to the django-part of your buildout.cfg and a "django.wsgi" will appear in your ./bin folder :-)</p> <p>And if you set the <code>test</code> option to a list of applications, the djangorecipe will create a nice wrapper for you that runs all the tests for the listed application in your project.</p> <p>If you want to develop a single app in a standalone environment for debugging etc., Jakob Kaplan-Moss has a quite complete tutorial on <a href="http://jacobian.org/writing/django-apps-with-buildout/" rel="nofollow noreferrer">his blog</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload