Installing Django under Windows

Source: Internet
Author: User
Tags install django

1, the installation of Python

It must have been installed before the installation of Python, I was using the python2.7,python http://www.python.org/

2. Installing Django

(1) cmd in the CD to your installed Django installation directory, you can see setup.py this file. Then execute the python setup.py install in cmd, and 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
>>> ("final", 0)
The above information displays the Django version information stating that the installation has been successful.

(3) Create a project

Django is installed in the Python directory under this django-admin.py in the Python27/scripts directory

So CD to the directory, Note: here to write the full path of django-admin.py, Python d:\Python27\Scripts\jango-admin.py startproject MyTest, Otherwise, the project cannot be created.

(4) Operation

    CD to mytest directory, execute command  python manage.py runserver  
      will then display the following message:  
    validating models...    
    0 Errors found   
django version 1.2.3, using Settings ' mysite.settings '   

Next in the browser input http://127.0.0.1:8000/
The following information is displayed:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/2A/wKioL1V1jDPxHmcyAAECO0Ob-Ww937.jpg "title=" Qq20150608202645.png "alt=" wkiol1v1jdpxhmcyaaeco0ob-ww937.jpg "/> Instructions have been successfully installed.

Installing Django under Windows

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.