In the general case, when you want to run a custom admin command that is part of a project, you run it using the manage
command, not django-admin
. So in this case, the command to use this would be:
python manage.py createsuperuser
(It’s the same way you would use runserver
or makemigrations
or migrate
, etc.)