A Django project has an outer project folder and an inner configuration directory, which usually has the same name. That duplicate naming is easy to trip over: RiffMates/RiffMates is the package holding project-wide setup, not a second application. section 2.2
RiffMates/ ├── RiffMates │ ├── __init__.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── manage.py
The inner directory contains the generated configuration modules, while manage.py stays in the outer project directory. section 2.2
Create this directory with django-admin startproject. Django generates urls.py for URL mappings, settings.py for project settings, and WSGI-related setup; the generated layout also includes asgi.py and __init__.py. Every Django website needs its own project configuration files. section 2.2
Keep the two directory roles distinct:
- The outer project directory is the working folder: it contains manage.py, which runs project control and configuration commands. section 2.2
- The inner configuration directory is a Python package containing project-wide modules such as settings.py and urls.py. section 2.2
- Apps hold website code such as views; register an app through INSTALLED_APPS in settings.py and map its views through urls.py. section 2.9
Finding RiffMates settings
After running django-admin startproject RiffMates, look for RiffMates/RiffMates/settings.py when Django reports that it is using RiffMates.settings. Use the outer RiffMates/manage.py to run commands such as runserver. section 2.2
