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
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:\> django-admin.py --version 1.7.4 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:\> django-admin.py 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.
crunchadeal/ manage.py crunchadeal/ __init__.py settings.py urls.py wsgi.py
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 manage.py runserver
PS C:\crunchadeal> python manage.py 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 manage.py migrate' to apply them. February 06, 2015 - 11:54:24 Django version 1.7.4, using settings 'crunchadeal.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.
You have a working Django framework now. You can start developing your application using Django. This is the best and easy method for Django framework. Happy coding!!