Appendix G. The django-admin Utility

django-admin.py is Django's command-line utility for administrative tasks. This appendix explains its many powers.

You'll usually access django-admin.py through a project's manage.py wrapper. manage.py is automatically created in each Django project and is a thin wrapper around django-admin.py. It takes care of two things for you before delegating to django-admin.py:

  • It puts your project's package on sys.path.

  • It sets the DJANGO_SETTINGS_MODULE environment variable so that it points to your project's settings.py file.

The django-admin.py script should be on your system path if you installed Django via its setup.py utility. If it's not on your path, you can find it in site-packages/django/bin within your Python ...

Get The Definitive Guide to Django: Web Development Done Right now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.