Configuring the Django Environment under Windows

Source: Internet
Author: User

Worked hard, and finally built the Django environment on WINDOWS10 and successfully set up the project

1. First install Python, configure the environment variable path:c:\python27;c:\python27\scripts;

2. Go to the Django website to download the Tarball django-1.8.3.tar.gz, then unzip it in the C drive and enter the following command:

CD C:\Django-1.8.3

Python setup.py Install

After the command is run, the Django environment is installed, and then the environment variable is configured Path:c:\python27\lib\site-packages\django-1.8.3-py2.7.egg\django\bin

3. Import and check the Django installation by entering the following command at the command terminal:

Python

>>>import Django

>>>django. VERSION


4. Create a Django Project

Django-admin startproject cms678 (project name)

This will result in a cms678 project folder in the user directory.

manage.py: You can manage this project from the command line.

-------------------------------------------------------

__init__.py: Use this project directory as a Python package.

settings.py: The configuration file for the project.

urls.py: Defines a URL routing table in a Django project that specifies the correspondence between the URL and the called Class.

wsgi.py: This is the newly added default Web server gateway interface in Django1.4.

The command window switches to the cms678 folder and then runs the command: Python manage.py runserver, starting the current directory project.



Browser input Http://127.0.0.1:8000/

This basic operation is over.:-)

Configuring the Django Environment 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.