Django Learning Handbook-creating Django Projects and apps

Source: Internet
Author: User

Previous steps:

Download Python,django and install the Python interpreter as well as the Django module.

The overall steps are described:

Create a Django Project

Step one: Go to the installed Python directory

Step Two: Enter the command to create the project:

Create a Business App Catalog

Step One: Enter the project catalog that has been created

Step Two: Enter Create app project name

To create a Django project:

1. Go to the Scripts directory in the installed Python directory

  

2. In the empty space of this folder SHIFT + right mouse button , open the command window here

3. Under this window, enter:

1 django-admin startproject Test (project name)

then enter.

  

At this point in the directory more than a file, this file is the creation of the project directory.

  

Expand:

The project document consists of four important documents:

  

  

File composition:

#######################################################

Test1

-test1 #对整个程序进行配置

-init

-setting #配置文件

-url #url对应关系

-wsgi #遵循wsig规范, Uwsgi + Niginx

-manage.py #管理django程序

#######################################################

Create a Django Engineering app:

In the new project catalog

  

Under the command bed type:

Python  manage.py Startapp app1 (app name)

  

At this point, you can see that the App1 file in the file has been created.

Django Learning Handbook-creating Django Projects and apps

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.