29. Python's web Framework Django Primer

Source: Internet
Author: User
Tags install django

First, Django introduction

  1, Django installation . Django installs and installs the other modules, we find the script directory of the Python installation directory, and then execute the command: PIP3 install Django. After the installation is complete, you will see the following Django-related files in the script directory

After executing this command, add the script directory to the environment variables of the system, and we can use the Django command to execute it in any directory on the system. Let's create a new Django project.

Once created, let's look at the directory structure of the Django Project first.

Now let's start the project by using the command python manage.py runserver 127.0.0.1:8001. It is important to note that Python needs to configure the environment variables, and we want to go into the root directory of our project to execute, the following is the start of success, this time we visit http://127.0.0.1:8001/can visit our website,

It's a lot easier to install Django in Pycharm, and take a look at the figure 4 steps to solve.

OK, after installing, we use Pycharm to create a Django project.

After the creation is complete, we see that the project's directory structure is:

And we created in the command line exactly the same, just a templates directory, this is Pycharm help us to create, forget it, and then we configure the launch of the information, click the Pycharm Launch button to complete the site launch.

29. Python's web Framework Django Primer

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.