Welcome to TheCredence.com - You may like to subscribe to our RSS feed to stay updated.

There has been a constant growth of the number of Python based web frameworks. A possible explanation could be Ruby’s success on Rails. Two of most used open source web application frameworks for Python are Django and Turbogears. This tutorial on the installation of Django is meant to help the newcomers, because both Django and Turbogears installation processes are not quite easy to complete.

Earlier I had compared Best PHP frameworks and there I had bragged about How great Django programmer I am (which was a little exaggerated IMO) but anyway I was thinking of writing some Django HowTo and felt to write on Installing Django on Windows. Honestly I don't know why would you like to work on windows with Django but anyway, if you want than this is what you have to do.

1. First you need to have Python installed on your computer. Download from their website, python.org the latest Windows version and install it as any other software.

2. After you have set up Python, PostgreSQL must also be installed.This step is required because there is the need for a database to use Django. Any database management system can be used for this step and it is up to the user to install the one he knows best to work with(MySQL, SQLite, PostgreSQL). If PostgreSQL is chosen, after unzipping the archive, three files, among which a readme.txt it is. Install the application by double clicking on the postgresql-8.1.msi file and follow the steps indicated. It is necessary to install pgAdmin III and psql in order for Django to work properly.

3. In order for Django to run, it is required for the installation of the mx Extensions for Python. The mx Extensions are necessary to be present because Django also requires psycopg so it can negotiate with the database.

4. The nest step is the installation of win-psycopg - Win-psycopg is to be installed after the latest versions of Python and mx Extensions are present on the computer. Because the psycopg devs doesnot maintain the win32 binaries, the unofficial Windows installer for psycopg must be used. Although it is an unofficial version, it works properly.

5. Django comes by itself with a development server the developer can use in order to test and code the applications. But many times a real Apache server installation can be useful if one may desire in the future to use the application into production. I prefers to work on the default server of Django though.

6. The nest step in the installation of mod_python 3.x, the Apache server module which integrates Python into the Apache server. The latest mod_python 3.x version which is required by Django can be found on their website.

7. The last step is the download and installation of Django framework itself, once all the additional modules and software have been properly installed.

Edit - as much as I hate to say, there is 10 times better written article than this one on installing Django on Windows here. I will highly advice you to go there and see it. It is just that I was not aware of it :)

Edit 2 - This question has always bothered me that why people prefer PostGreSql over MySql. I mean where ever I see, everyone seems to be working on Django + PostGreSql. Why it is so ?

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
Subscribe in a reader |

Links you may find interesting -