简体   繁体   中英

How to create superuser in django using Unix Environment

when I'm using Visual Studio Code for the Django project in windows Environment, for creating a superuser I'm using the below command.

(test) C:\Users\SAHEB\projects\project>python manage.py createsuperuser

this same Django project is deployed in Unix server, below is the path where whole project is deployed.

/apps/sample/python

but python manage.py createsuperuser this command is not working in Unix server from this path, what's the solution

from_the_docs : runserver is to start a server and not to create superuser.

from_the_docs : To create superuser run following command:

django-admin createsuperuser

python manage.py createsuperuser works on all platforms. I think it's because of your path. Type dir and press enter in your cmd (make sure you do it in your project directory) at let's see if there is a file called manage.py or not.

(test) C:\Users\SAHEB\projects\project>dir                                         

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM