I've been working with Django for several years now (I used to develop mainly in Java/Spring/Hibernate etc.), and at first I was very skeptic, but now - I'm planning to start my new venture with Django/Python as well.
So, if you have to use a windows environment, here are the first steps to setup you env:
- Install Python
Install python 2.7 (you can also use python 3, but it's different...and I'm not writing about this here) from http://www.python.org/download/
Setup python 2.7 in your windows environment variables (if you do not know how to set the environment variables view http://www.itechtalk.com/thread3595.html).
- Database installation
Install the database you want (MySQL, PostgreSQL etc. even SQLServer will work, but this is not a natural choice).
- Install the Database Driver
For each database you chose, you should download the relevant driver for python, for example, MySQL driver can be found here - http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download, there's a windows installation available in codegood.com (I used this installation for my windows env).
- Install Pip
So what is pip? Pip is the python package index, it will make your life easier! by using a simple command -
pip install <your_package>
you'll be able to install almost any python package available.
To install pip, first download "easy install" from https://pypi.python.org/pypi/setuptools/2.1#windows
Now, from the command line write
easy_install pip
And you are ready with pip.
To see the available packages that can be installed with pip see - https://pypi.python.org/pypi
- Install VirtualEnv (in a nutshell...)
I'm not going to exaplin about the virtual anv here, but basically if you want to run several applications with several Django versions etc. You should use the virtual env, which stores in a local folder all the packages relevant to your app.
To install -
easy_install virtualenv
Or
python pip install virtualenv
See http://www.virtualenv.org/en/latest/virtualenv.html
- Eclipse setup with PyDev
It's not mandatory, but it will make your life easier when coding.
Download eclipse from http://www.eclipse.org/downloads/
Install PyDev from eclipse "Help" --> "Install New Software" --> In the "work with" section add PyDev - http://pydev.org/updates
- Install Django
From the command line run
pip install django==1.6.1
(1.6.1 is currently the latest official version).
If you are using a virtual env, make sure you run pip from within the relevant application.
- Start the Django Tutorial
https://docs.djangoproject.com/en/1.6/
I recommend to start developing with eclipse.
I'm here if you have any questions,
good luck.
Very informative post...
ReplyDeleteDjango Setup for Windows (will try to setup it..)
Top 5 Flutter Advantages & Disadvantages to Review in 2021
Flutter app development services
This comment has been removed by the author.
ReplyDeleteFor more info
ReplyDeleteFollow this blog..
Iqra technology