How To Install and Configure Django Framework on Windows

How To Install and Configure Django Framework on Windows

Django is the best framework for developing python based web applications. Installing Django on windows is very easy and you can get a test Django website up and running in minutes.

Install and Configure Django Framework

Install and configure django on windows

1. Download the latest version of python msi package from the this link
2. Install the downloaded msi package.
3. Open the terminal (cmd or powershell) and execute the following command to verify the installation.

PS C:\> python --version
Python 3.4.2
PS C:\>

4. The latest version of python comes with python package manager “pip”. If you installed the older version of python , you can install pip using the following command.

easy_install pip

5. Install Django framework using the following pip command.

pip install django
PS C:\> pip install django
Downloading/unpacking django
Installing collected packages: django
Successfully installed django
Cleaning up...
PS C:\>

6. Verify django installation using the following command.

PS C:\> --version
PS C:\>

Creating your first django project

1. Create a project using the following command. Replace “crunchadeal” with a project name you like.

PS C:\> startproject crunchadeal
PS C:\> ls

2. The above command will create a project directory named crunchadeal with all the necessary files. If you open the project directory, it will have the following tree structure.


3. Now we have all the project files ready. We can test this by running the django server using the following command. Run this command from your project directory. In our case its crunchadeal

python runserver
PS C:\crunchadeal> python runserver
Performing system checks...
System check identified no issues (0 silenced).
You have unapplied migrations; your app may not work properly until they are applied.
Run 'python migrate' to apply them.
February 06, 2015 - 11:54:24
Django version 1.7.4, using settings 'crunchadeal.settings'
Starting development server at
Quit the server with CTRL-BREAK.

You have a working Django framework now. You can start developing your application using Django. Happy coding!!

Copy link
Powered by Social Snap
Copy link
Powered by Social Snap
Share via
Copy link
Powered by Social Snap