Python tutorial Django (ii)

Source: Internet
Author: User

Official website: https://www.djangoproject.com/download/

1. Simple method:

A, Pip command installation methodpip install Django

Open DOS Command Window

Enter the command and the toolkit will go to GitHub to download

B, manual installation (website download)

Download the package labeled right. Unzip, here I put Python and Django together.

Open DOS into the Django directory

Enter the installation command:

The entire installation will copy all the necessary files to Python35

At this point we need to be equipped with an environment variable, so that we can execute the command, if not worthy of execution, but to open a command to the directory location of the file can be, so to facilitate

Let's match the environment variables:

We add the above path to path, Note: There is a semicolon between each path

Next we can test whether it is successful;

I built a project folder under the Python folder to make it clearer

The following django-admin startproject MySite is a command to create a project;

After execution, a project called MySite is created under the file, so our Python and Django are all installed!

Note: Django-admin is a shorthand, it performs the configuration we just

The previous wording is django-admin.py startproject MySite but this folder does not have django-admin.py, but in the following directory there are:

What is the difference between the two?

Let's look at the code:

We can see that django-admin.py is a command management execution,

But in the django-admin-script.py we can roughly see the meaning of the Code, program execution of the entrance of this executable program called Django-admin, this should be called Django-admin.exe

Where is this file? Of course it is relative to its own path:

Python tutorial Django (ii)

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.