Monday, February 27, 2012

Installing django on Windows

In the name of ALLAH who is most Beneficent and most Merciful

Salaam ,

   If you are web developer who have done lot of work in PHP, Joomla, CI and wordpress e.t.c. and you think that you can be a better web developer only by doing more and more work in PHP then think again. PHP have lot of good frameworks but there are lot of things that are used to determine a better framework. Also a single language dependent framework is not as good as developer who have tasted different frameworks. Then why not start a framework that is much better than many other frameworks present there. I am talking about Django and going to tell about installation of Django on windows while there is xampp already installed, as there are some people who find some difficulties in installing.
 
  So following are steps to follow.
1. Go on http://python.org/download/  and download python 2.x  not python 3 as Django right now at the time of writing this article, don't support Python 3. So download python 2.x  windows installer version and install it and restart your command prompt before next step if it is already running and more better to once restart system.
2. Go to Django website, download page: https://www.djangoproject.com/download/  and download latest official release. Currently it is Django 1.3 . Then extract it and navigate through that extracted folder using command prompt.
3. Type " setup.py install " and it will install django. To check if  it is install correctly, open your python console and type "import django" if it doesnot give any error then it means that django is successfully installed. But remember that normally MySQLDB module that is used by django don't come by default. So you will need to do some thing to connect django with mysql.
4. MySQLdb is just a connector for MySQL. When I tried installing it, it didn't find it easy to get and install MySQLdb. But thanks to pymysql another connector that can be used as an alternative of MySQLdb and there is no difference in using any of these. I found about pymysql from here:
http://web-eng-help.blogspot.com/2010/09/install-mysql-5-for-python-26-and.html
Please go to this site to know the way of installing pymysql in detail.

Please ask any question if you find any problem installing Django on windows. I will try to solve your problem.

thanks