setup django quick install


All this text and help provided by
http://docs.djangoproject.com/en/dev/intro/install/

Get the live code from live code base.

ankur@ankur:~> svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk

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:

ankur@ankur:~> python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
/usr/lib/python2.6/site-packages
ankur@ankur:~> ln -s `pwd`/django-trunk/django /usr/lib/python2.6/site-packages/django

This simply lets you type django-admin.py
from within any directory, rather than having to qualify the command with the full path to the file.

ankur@ankur:~> ln -s `pwd`/django-trunk/django/bin/django-admin.py /usr/local/bin

Now we don’t have to run python setup.py install,
because you’ve already carried out the equivalent actions in above steps.

ankur@ankur:~> mkdir django-code
ankur@ankur:~> cd django-code/
ankur@ankur:~> django-admin.py startproject mysite
ankur@ankur:~/django-code> ll
total 4
drwxr-xr-x 2 ankur users 4096 2010-09-18 12:09 mysite
ankur@ankur:~/django-code> cd mysite/
ankur@ankur:~/django-code/mysite> ll
total 24
-rw-r--r-- 1 ankur users    0 2010-09-18 12:08 __init__.py
-rwxr-xr-x 1 ankur users  546 2010-09-18 12:08 manage.py
-rw-r--r-- 1 ankur users 3386 2010-09-18 12:08 settings.py
-rw-r--r-- 1 ankur users  482 2010-09-18 12:08 urls.py
ankur@ankur:~/django-code/mysite> python manage.py runserver
Validating models...
0 errors found

Django version 1.3 pre-alpha SVN-13861, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[18/Sep/2010 02:11:07] "GET / HTTP/1.1" 200 2051

At http://127.0.0.1:8000/ Says

It worked!
Congratulations on your first Django-powered page.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: