1. Mathieu Agopian
  2. django_base



1/ Clone the repository

    hg clone http://bitbucket.org/magopian/django_base/ myproject

2/ Modify the 'templates/base.html' template to suit your needs

3/ Create a symbolic link to the django admin media files to the 'static' folder

    Example (for hosting on http://alwaysdata.com):

        ln -s /var/lib/python/django/1.1.1/django/contrib/admin/media/ /path/to/project/static/admin-media

4/ If you wish to use a virtualenv

    make sure this file's parent folder is the virtualenv root folder containing the lib/ folder (or change the static/setpath.py script)

5/ If you wish to use a different interpretor

please check the fcgi or wsgi doc

6/ If needed, copy (or symbolic link) the htaccess.fcgi or htaccess.wsgi file to .htaccess

    Example (using fcgi):

        cp `pwd`/static/htaccess.fcgi `pwd`/static/.htaccess

    Then point your vhost to the static/ folder containing it

7/ Optionnally edit the pip_requirements.txt file to add more packages to install

8/ Install the requirements

    by default, only django latest stable version will be installed:
        pip (-E /path/to/virtual/env/) install -r pip_requirements.txt


    to create a virtualenv (with no site-packages)

        $ cd /path/to/
        $ virtualenv --no-site-packages venv


    to create a standard virtualhost for apache, to run either in fcgi or wsgi

        <VirtualHost *:80>
            ServerName www.example.com
            ServerAlias example.com
            ServerAdmin john@example.com
            DocumentRoot /path/to/venv/djangoproject/static/

            <Directory /path/to/venv/djangoproject/static/>
                Order allow,deny
                allow from all


    if you'd rather use the awesome gunicorn wsgi server, read (french):

    You can then use supervisord to launch gunicorn and monitor it (french):