First Django app (individual files and folder resolution)

Source: Internet
Author: User

mkdir mysitecd Mysitedjango-admin.py startproject MySite

Execute the above command to get the content:

mysite/    manage.py    mysite/        __init__. py        setting.py        urls.py        wsgi.py 

1. The name of the external MySite folder can be changed arbitrarily.

2. manage.py file, this file will be automatically created in the Django project, it can do the same thing as django-admin, it can also add the path of the package in your project to the Sys.path file, and set the Django_settings_ The module environment variable points to the setting.py file in your project.

3, the internal MySite folder is a practical use, you need to use this name to import the content (import).

4. __init__.py file, this file is to tell the Python interpreter that this is a Python package.

5, setting.py file, is used to set/Configure your Django project.

6. urls.py file, a declaration of the URL of the Django project. The directory for the Django project.

7. wsgi.py file, (Wsgi:python Web Server Gateway Interface) is a pointcut for WSGI compatible Web Server service projects.

First Django app (individual files and folder resolution)

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.