Project Structure
The project is built using Python 3.11, Pipenv, and Django 5.06.
- Structure: This project is structured in 3 levels.
Main Level :bash: $ cd . :bash: We have the documentation folder here, the Django Project overall folder, and some Pipenv package management. You can’t run anything from here. It just combines these three ideas under one heading.
Second Level :bash: $ cd docs/ :bash: This is where the documentation lives. You can run sphinx commands from here like :bash: make html :bash: to create the docs in the “_build” directory. To write manual docs, look into the manualdocs folder and create rst documents. Autodocs in the autodocs folder can be created using the sphinx-autodoc commands.
Second Level :bash: $ cd mldjango/ :bash: This is where the Django project can be run. You can run django commands like :bash: python manage.py runserver :bash: to run the website.
Third Level: This dives into the actual django and docs directories. It’s important to understand these but too specific for this page.
Django Structure - Apps: Django controlled from the main directory and built in apps. For this project, it never made sense to build more than one app. That means that all development is done in the “mld” app, that’s mldjango/mldjango/mld from the parent directory.
Docs Structure - Docs: We have manual docs to explain everything and autodocs to autogenerate docstrings. This is all linked up using the index.rst page.