Django - How to create a superuser?
Trying to get a Django app going and it comes with the admin / user system in place and I can navigate to /admin. But I can't create a super user in the terminal, as it simply has the server running.
I realised I could do this by creating a new migration file.
Link to the content I put into the migration file to create a superuser.
Great! I figured out how to do so. What I did is went to VIEWS.py. next I import the module os. Then create a function call createSuperUser(request): I then create a variable called admin and set it equal to os.system("python manage.py createsuperuser"). then after that return admin. Finally restart the django site, then it will prompt you in the terminal. Man I am so brillant. lol