Installing Django on Windows

Posted by Pranav on Geeks with Blogs See other posts from Geeks with Blogs or by Pranav
Published on Tue, 20 Apr 2010 11:34:23 GMT Indexed on 2010/04/20 12:13 UTC
Read the original article Hit count: 208

Filed under:

Ever needed to install Django in a Microsoft Windows environment, here is a quick start guide to make that happen:

  1. Read through the official Django installation documentation, it might just save you a world of hut down the road.
  2. Download Python for your version of Windows.
  3. Install Python, my preference here is to put it into the Program Files folder under a folder named Python<Version>
  4. 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.
  5. 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.
  6. 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\.
  7. 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!

© Geeks with Blogs or respective owner