I am using Django (version 1.3) and have forgotten both admin username and password. How to reset both?
And is it possible to make a normal user into admin, and then
Just type this command in your command line:
python manage.py changepassword yourusername
python manage.py changepassword <user_name>
see docs
I think,The better way At the command line
python manage.py createsuperuser
The best way is to just go to your terminal and type
python manage.py createsuperuser
and insert another password and user name again but u will lost some of your profile that u have created before in most cases.
You may try through console:
python manage.py shell
then use following script in shell
from django.contrib.auth.models import User
User.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 (:
You may try this:
1.Change Superuser password without console
python manage.py changepassword <username>
2.Change Superuser password through console