The setup of Django Environment under Windows environment

Source: Internet
Author: User
Tags install django pip install django in python
Here 's a summary of the setup of the Django Environment in the window environment:

First we open the Django official website https://www.djangoproject.com into the following pages:

Click Download to enter the download page:

On this page, we know that to install Django, we can first install the PIP tool in our Python swap, and Pip is a package management tool in Python where we can download and install the various packages and modules we need in the development process. Access to the PIP link https://pip.pypa.io/en/latest/

The following figure:

Click Installation to enter the PIP installation interface to find the installation method for the PIP in the Windows environment:

In the CMD interface, perform the python-m pip install-u pip This command to install the PIP, after the installation completes, executes the PIP this command, will prompt the command not to execute, this time needs to set the environment variable, the python installs the path the scripts The path is added to the environment variable, for example, my path is D:\Program files\scripts, and the configuration environment variable looks like this:

You can then execute PIP commands in the CMD interface, performing pip install Django for Django installation,

This time the display is successful, configure the Django environment variables, locate the Site-package file under the Lib folder under the Python installation directory, and add the Django file directory, for example, my directory is D:\ProgramFiles\Lib\ Site-packages\django, you can use Django:



This completes the Django installation.

The following is the creation of our first Django project, which executes django-admin.py startproject MySite in the cmd interface, creates a MySite folder under the current folder, and the CD switches to this folder, To perform manage.py Runserver, the following interface appears:


And then enter 127.0.0.1:8000 in the browser, you can successfully enter the Django home page:

This is the setup and simple use of the Django environment under Windows, and please correct me in the wrong place.

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.