Django Using django-admin instead of manage.py


Example

You can get rid of manage.py and use the django-admin command instead. To do so, you will have to manually do what manage.py does:

  • Add your project path to your PYTHONPATH
  • Set the DJANGO_SETTINGS_MODULE
export PYTHONPATH="/home/me/path/to/your_project"
export DJANGO_SETTINGS_MODULE="your_project.settings"

This is especially useful in a virtualenv where you can set these environment variables in the postactivate script.

django-admin command has the advantage of being available wherever you are on your filesystem.