Skip to main content

Project Structure

Below is the structure of a new project.

.
├── compose
├── django_app
├── docs
├── frontend
├── manage.py
├── package-lock.json
├── package.json
├── requirements.in
├── requirements.txt
  1. compose contains config files for Docker Compose
  2. django_app contains Django apps, I will talk about it in the next section.
  3. docs contains all doc stuff
  4. frontend is a NPM project bundled by Webpack.
  5. Some files are omitted for brevity.

django_app

Below is the files in the django_app directory.

.
├── __init__.py
├── asgi.py
├── celery.py
├── cms
├── core
├── demo_celery
├── demo_tasks
├── settings.py
├── static
├── templates
├── tests
├── urls.py
├── users
└── wsgi.py

The django_app contains below Django apps

  1. core contains some core code.
  2. users contains user models and views.
  3. cms contains some page models based on Wagtail CMS.
  4. demo_tasks is a Django app to show you how to make Stimulus, Turbo work with Django.
  5. demo_celery is a Django app to show you how to make Stimulus, Turbo work with Celery.

The django_app also contains below files and directory

  1. celery.py is entry file for Celery.
  2. settings.py is the Django settings file.
  3. static contains static assets.
  4. templates contains all template files.
  5. tests contains all testing stuff.