Django Tutorial 1 — Project File structure
I am starting a new Course on Django Web Framework. Today we are going to see File structure of Django Project.
Command to create a Django Project
django-admin startproject FirstProject .
in the above command ‘.’ will represent that the FirstProject will be created in same directory.
Following is the File structure of FirstProject
- settings.py: Here all the applications settings get stored. You can also find the information about middleware used, database connections and path to the main url config.
- __init__.py: This is an empty python script which lets python interpreter to treat this directory as python module/package.
- urls.py: This file store all url patterns for the web pages of web application. This also stores url-config specific to an application.
- wsgi.py: This file acts as a web server gateway interface. It helps in deployment of project in production.
- manage.py: This is a command line utility. Helps in creating an application, migrations and so on so forth.
Note: Feel free to comment if you find any mistakes.