Install the Django Web framework in Windows

Source: Internet
Author: User
Tags install django

1. Python Installation

Python must be installed before installation. I use python2.7.

 

Because Django does not support version 3.0, only version 2.7 can be used. Python http://www.python.org/

 

2. Install Django

 

(1) Cd in cmd to the installation directory of your installed Django, you can see the setup. py file.

 

Then execute Python setup. py install in cmd. Now the command line has automatically started to install Django. Django

 

Http://www.djangoproject.com/download/

 

(2) then enter the command in cmd

: Python
>>> Import Django
>>> Django. Version
>>> (1, 2, 3, 'final', 0)
The Django version information displayed above indicates that the installation is successful.

 

(3) create a project

Django installed under the python directory this django-admin.py is under the python27/scripts directory

So CD to this directory
Execute the django-admin.py startproject mysite

Project created

 

(4) Run

CD to mysite
Execute Command
Python manage. py runserver
The following information is displayed:
Validating models...
0 errors found

Django version 1.2.3, using settings 'mysite. setting'
Development server is running at http: // 127.0.0.1: 8000/
Quit the server with CTRL-BREAK.
[22/OCT/2010 13:28:14] "Get/HTTP/1.1" 200 2051

Enter http: // 127.0.0.1: 8000/in the browser/
The following information is displayed:
It worked!
Congratulations on your first Django-powered P

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.