liveBook · Manning

Manage.py

As explained in Django in Action

manage.py is a project-local Python utility script that invokes Django management and configuration commands for a project.

manage.py is the project-local command script Django creates with a new project. It is similar to django-admin, but serves control and configuration actions for that specific project. section 2.2

Run it with Python from the project’s outer directory. For example, `python manage.py runserver` starts the development server; the output identifies the settings module in use and warns about unapplied migrations. section 2.2

Create an app

Use `python manage.py startapp` followed by an app name to generate an app’s skeleton files. Register that app in `INSTALLED_APPS` before Django can use it. section 2.9

(venv) RiffMates$ python manage.py runserver

This command starts Django’s development server through the project’s manage.py script. section 2.2

How Django in Action covers it

How deep it goes
Defines manage.py by role and demonstrates runserver and startapp without detailing the script’s implementation.
Examples
Demonstrates python manage.py runserver and python manage.py startapp in the RiffMates project.
What you can do after
Operate/configure a Django project by starting its development server and generating an app skeleton.
How it connects
Connects Django projects to django-admin, settings.py, INSTALLED_APPS, apps, migrations, and the development server.

This explainer was generated by Manning's knowledge graph from the text of Django in Action. The section links point to the parts of the book it draws on.