A skeleton of a django project looks:
(Based on our django Django-Starter Template)
This is just a summary of the documentation on https://docs.djangoproject.com/ and a continuation of our "Getting Started with Django" article.
├── manage.py ├── myapp │ ├── admin.py │ ├── apps.py │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ └── views.py └── _projectroot ├── asgi.py ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-38.pyc │ ├── settings.cpython-38.pyc │ ├── urls.cpython-38.pyc │ └── wsgi.cpython-38.pyc ├── settings.py ├── urls.py └── wsgi.py
_projectroot/root directory is a container for your project. The folder can be renamed.
manage.py: A command-line utility that lets you interact with this Django project in various ways. Do not touch this file.
_projectroot/directory is the actual Python package for your project. Its name is the Python package name you’ll need to use to import anything inside it (e.g.
_projectroot/__init__.py: An empty file that tells Python that this directory should be considered a Python package.
_projectroot/settings.py: Settings/configuration for this Django project.
_projectroot/urls.py: The URL declarations for this Django project; a “table of contents” of your Django-powered site.
_projectroot/asgi.py: An entry-point for ASGI-compatible web servers to serve your project.
_projectroot/wsgi.py: An entry-point for WSGI-compatible web servers to serve your project.
admin.py: Registering your models here for them to be manipulated on the django admin
apps.py: Contains the app configuration code
models.py: Define your models here. These are the tables used for storing data and defining their relations
tests.py: Writing tests for the app
views: Defining data to be rendered on the templates