Django 2.0 Create a new app what do you do shorthand?

Source: Internet
Author: User

Newer versions of older users can refer to other people's blogs

Most of the commands are in the project my project name is called Bigprotect root directory, that is, and manage.py the same level of directory


1. Create a new app example

Python manage.py Startapp Example


2. Add in the Instadlled_apps of the settings under Bigprotect, that is, insert the application into Django, otherwise it cannot be found

' Example.apps.ExampleConfig ',


3. Add your own model to example's models

After you finish, Python manage.py migrate


4. Add URLs


5. Add views


6. Example's templates create a example folder and put them in the templates

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.