Installing Django on Windows
- by Pranav
Ever needed to install Django in a Microsoft Windows environment, here is a quick start guide to make that happen:
Read through the official Django installation documentation, it might just save you a world of hut down the road.
Download Python for your version of Windows.
Install Python, my preference here is to put it into the Program Files folder under a folder named Python<Version>
Add your chosen Python installation path into your Windows path environment variable. This is an optional step, however it allows you to just type python in the command line and have it fire up the Python interpreter. An easy way of adding it is going into Control Panel, System and into the Environment Variables section.
Download Django, you can either download a compressed file or if you’re comfortable with using version control – check it out from the Django Subversion repository.
Create a folder named django under your <Python installation directory>\Lib\site-packages\ folder. Using my example above that would have been C:\Program Files\Python25\Lib\site-packages\.
If you chose to download the compressed file, open it and extract the contents of the django folder into your newly created folder. If you’d prefer to check it out from Subversion, the normal check out points are http://code.djangoproject.com/svn/django/trunk/ for the latest development copy or a named release which you’ll find under http://code.djangoproject.com/svn/django/tags/releases/.
Done, you now have a working Django installation on Windows.
At this point, it’d be pertinent to confirm that everything is working properly, which you can do by following the first Django tutorial. The tutorial will make mention of django-admin.py, which is a utility which offers some basic functionality to get you off the ground. The file is located in the bin folder under your Django installation directory. When you need to use it, you can either type in the full path to it or simply add that file path into your environment variables as well.
Hope this helps!