Intro#

I've decided to keep these large frameworks isolated.

Procedure#

Install virtualenv#

See Virtual Python Environments for detailed instructions.

Check out Django source.#

(django_env) $ svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk

Make sure that the Python interpreter can load Django’s code#

There are various ways of accomplishing this. One of the most convenient, on Linux, Mac OSX or other Unix-like systems, is to use a symbolic link:

(django_env) $ ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django

In the above line, change SITE-PACKAGES-DIR to match the location of your system’s site-packages directory. In my case, this was (from /Users/arcoleo/Python/django_env/)

(django_env) $ ln -s `pwd`/django-trunk/django /Users/arcoleo/Python/django_env/lib/python2.5/site-packages/django

Add django-admin.py to path (only for current virtualenv)#

(django_env) $ ln -s /Users/arcoleo/Python/django_env/django-trunk/django/bin/django-admin.py /Users/arcoleo/Python/django_env/bin

There is also no need to run python setup.py install. That's now accomplished.

Create a django project#

Create initial layout#

(django_env) $ cd ~/code/django-projects
(django_env) $ django-admin.py startproject mysite

Run it#

(django_env) $ cd ~/code/django-projects/mysite
(django_env) $ python manage.py runserver 8080

Test it#

Visit http://127.0.0.1:8080/

See also...#

Django Add-ons#

Possible problems#


Django