Understanding Directory Structure

By July 15, 2019Django

HelloWorld/

This is our Django main project directory. It is just a container for our project hence we can rename this directory to anything.

HelloWorld/manage.py

manage.py is command line utility for interacting with your project.

HelloWorld/HelloWorld/

This is our project directory. It is the actual Python package for your project.

HelloWorld/HelloWorld/__init__.py

An empty file, which guides Python to treat the directory as a Python module

HelloWorld/HelloWorld/settings.py

As the name suggests, this file contains configuration for the project.

HelloWorld/HelloWorld/urls.py

This file contains URL pattern of the project.

HelloWorld/HelloWorld/wsgi.py

wsgi is Short for Web Server Gateway Interface. Hence this is the gateway file to wsgi-compatible servers or application. More about WSGI can be read here.