Install Django in Windows

Source: Internet
Author: User
Tags install django

Install Django and start WEB Services in Windows

PythonIf the python editing environment appears, it indicates that Python has been installed. Even if python is not installed by default in Linux, installing python and Django on Linux is simple. It is a little complicated in Windows, and may involve environment variable configuration and other problems.

Xzvf Django-* .tar.gz

2) cd Django -*(Go to the decompressed directory)

3) sudo python setup. py install(Execute setup. py for installation)

C: \ Python27; C:/Python27/Lib/site-packages/django; C:/Python27/Scripts. After adding it, you can use Django's django-admin.py command to create a new project.

Django environment is configured, you can go to the command prompt to create the first Django application, enter a directory, execute the django-admin.py startproject myproject to create a project:

Manage. py runserver to start Django's built-in Web server. If you are lucky, the following 10013 error may not occur:

You don't need to worry when it appears. This is because port 8000 is occupied by other applications. Run netstat-ano in DOS to check the port usage of the application:

Myproject) to create a new view. py file with the following content:

Open the urls. py file, introduce views, and add ('^ hellodjango/$', hellodjango). In this line of code, the urls. py file is as follows:

 

 

 

 

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.