Use PyCharm to add a Django project, pycharmdjango

Source: Internet
Author: User
Tags install django pip install django

Use PyCharm to add a Django project, pycharmdjango

I. Preparations (download of PyCharm and Python, skipped)

 

1. First download PyCharm

Address: http://www.jetbrains.com/pycharm/

 

2. Download Python

Address: https://www.python.org/getit/

Here I chose 3.6.4

 

2. Download Django

Address: https://www.djangoproject.com/download/

There are many methods. Here we only talk about one method. For other methods, refer to the above address.

1. win + r Enter cmd to open the Command Prompt window

2. Input

pip install Django==2.0.3

The version number is later. For the compatibility between the Django version and Python version, see

Django version Python versions
1.8 2.7, 3.2 (until the end of 2016), 3.3, 3.4, 3.5
1.9, 1.10 2.7, 3.4, 3.5
1.11 2.7, 3.4, 3.5, 3.6
2.0 3.4, 3.5, 3.6
2.1 3.5, 3.6, 3.7

3. After the installation is successful, run the following command in the Command Prompt window:

Pip show django

You can find the downloaded directory.

4. Add Environment Variables

Add the directory of the binfile to the environment variable. For details, refer to my directory.

 

3. Use PyCharm to add a Django Project

In PyCharm Professional Edition, there are both Django options on the left side of the new project, but not in the Community version. You need to perform the following operations:

1. In the folder where you keep the project, right-click shift and choose here to open the command window

2. Enter the django-admin.py startproject mydjango

(Finally, your project name)

3. The project directory is generated under the current directory, as shown in figure

4. Use pycharm to open this project

5. Click Configure in the upper right corner.

6. Run the command after confirmation.

This is a success ~

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.