Understanding Django's file Structure

Kavin Desi Valli's photo
Kavin Desi Valli

Published on Dec 28, 2020

3 min read

Subscribe to my newsletter and never miss my upcoming articles

This article is part of a series regarding Complete Beginners Guide to Django. So, if you haven't seen the first part of this series, check it out at

So, after following the instructions in the first part, your file structure should like this

.
├── db.sqlite3
├── livecode247
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-38.pyc
│   │   ├── settings.cpython-38.pyc
│   │   ├── urls.cpython-38.pyc
│   │   └── wsgi.cpython-38.pyc
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
└── manage.py
└── myenv
    └── *

manage.py

manage.py is basically the main file of our whole project which runs our application. This file is rarely edited manually if not never. I have never had to edit it for anything

db.sqlite3

db.sqlite3 is the default sqlite database created by Django for our use. We will be using this database to store data regarding our application like blogs, the content inside them, etc.

livecode247 directory

init.py

An empty file file that tells Python that this directory should be a Python package

pycache

This directory is just some stuff which is generated by Django for caching stuff. It's not of much use to us

asgi.py

A file which helps us to deploy our app with ASGI-compatible web servers.

wsgi.py

A file which helps us to deploy our app with WSGI-compatible web servers.

settings.py

Stores all the settings and configurations for our projects. We will be updating this quite frequently

urls.py

Stores all the urls of the site and what view they point to.

In the next part of this series, we will be talking about how to create an app in our project and add a basic hello world page.

 
Share this