Chapter-8

Project Directory Structure

8.1. dJango project directory structure :-

8.2. dJango project directory structure types:-

8.2.1. __init__.py :-

The folder which contains __init__.py file is considered as python package. 

8.2.2. wsgi.py :-

WSGI(Web Server Gateway Interface) is a specification that describes how a web server communicates with web applications, and how web applications can be chained together to process one request. WSGI provided a standard for synchronous Python apps. 

8.2.3. asgi.py :-

ASGI(Asynchronous Server Gateway Interface) is a spiritual successor to WSGI, intended to provide a standard interface between async-capable Python webservers, frameworks, and applications. ASGI provides standard for both asynchronous and synchronous apps.

8.2.4. setting.py :-

This file contains all the information or data about project settings.

eg:-

Database Config information, Template, Installed Application, Validators etc.

8.2.4. urls.py :-

This file contains information of url attached with application. 

8.2.5. manage.py :-

manage.py is automatically created in each Django project. It is Django’s command-line utility also sets the DJANGO_SETTINGS_MODULE environment variable so that it points to your project’s settings.py file. Generally, when working on a single
Django project, it’s easier to use manage.py than django-admin.

PreviousNext