In this post, we will discuss about Django project’s basic directory structure.
Here is the directory structure:
<project-name> <app> <migrations> __init__.py admin.py apps.py models.py tests.py views.py <project-name> __init__.py settings.py urls.py wsgi.py <templates> manage.py
This is the root of our web application.
This folder organizes all the components of the application.
This folder contains our migration data that is used to create tables in database.
This folder contains all our view files that contains methods corresponding to URLs. In some other technologies, views are called controllers.
The _init_.py files are required to make Python treat the directories as containing packages. Packages are a way of structuring Python’s module namespace by using “dotted module names”
This file contains all our model classes that represents tables in database.
This folder is the Django root of our application.
This is the core setting file of a Django application.
This file maps URL patterns to methods in view files.
Web Service Gateway Interface is the Python way of deploying web applications. This file defines an entry point for WSGI compatible web servers.
This folder contains our template files that are html files mixed with Django code.
This is a command line utility that let us interact with our project.