Django includes the django-admin command.
I really want to spell it django.
I also wanted to be able to configure a
default settings module in a configuration file.
pip install django-cmd
django startprojectOnce installed, you can use the django command
the same as you would normally use the django-admin command.
Did you know that the manage.py script is just
a thin wrapper around the django-admin command?
All the wrapper does is set DJANGO_SETTINGS_MODULE
so that it can load your settings and find
any additional commands from your installed apps.
With a tiny bit of configuration,
you can use this django command in place of python manage.py!
In your pyproject.toml file,
add a section like this to configure your default settings module:
[tool.django]
settings = "myproject.settings"
# pythonpath = "src" # Default: the pyproject.toml directoryNow you can also use the django command
everywhere you would normally use python manage.py:
django runserver
django migrate
django createsuperuser