What happens in background when we pass the command python manage.py createsuperuser in Django?
Other people will answer this in detail but let me tell you in short what happens.
First when you pass the command python manage.py createsuperuser you will be prompted to fill the fields mentioned in USERNAME_FIELD and REQUIERD_FIELDS, when you will fill those fields then django will call your user model manager to access your create_superuser function and then code in that will execute to return a superuser.
I hope this will help you.
I'm working on Django and I know to create a account to log in into admin page I have to create a superuser.And for that we have to pass the command python manage.py createsuperuser.
But my question is when we pass this command what happens first and because of what in the background and after that what happens?? Which all methods and classes are called to create a superuser??
I know its a weird question but I wanted to know how this mechanism works..
Thanks in advance!!