Django Tutorial

Django Installation

You can go to the following website http://www.djangoproject.com/download/ and get the latest version of django. Download it to any place on your harddrive. Goto the location where you installed it and then type the following

$ tar xvzf <name of tar file>
$ cd name-of-the-folder
$ sudo python setup.py install

After this Django should be installed on the machine

Create your First Project in Django

The djangoadmin.py is responsible for creating the directories and files that will be used in the project.The following snippet of code when run on the command line will create a project titled eshelf. It will first create a directory with the same name, if we list the files in this directory we have the files as seen in the code block.

django-admin.py startproject eshelf

will create 
eshelf/
........./__init__.py
........./manage.py
........./settings.py
........./urls.py
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License