How to reset Django admin password? How to reset Django admin password? django django

How to reset Django admin password?


  1. python manage.py createsuperuser will create another superuser, you will be able to log into admin and rememder your username.
  2. Yes, why not.

To give a normal user privileges, open a shell with python manage.py shell and try:

from django.contrib.auth.models import Useruser = User.objects.get(username='normaluser')user.is_superuser = Trueuser.save()


You may try through console:

python manage.py shell

then use following script in shell

from django.contrib.auth.models import UserUser.objects.filter(is_superuser=True)

will list you all super users on the system. if you recognize yur username from the list:

usr = User.objects.get(username='your username')usr.set_password('raw password')usr.save()

and you set a new password (: