views:

28

answers:

1

I have some data in my dev database (not yest exported to fixtures), so I dont want to run syncdb.

However, I have lost my pwd for the admin section of my demo django website (I have not worked on it for a little while)

Is the password stored somewhere in the config/settings etc?

How can I recover the admin pwd?

+1  A: 

If you have Django 1.2 installed, you can simply invoke ./manage.py changepassword <username>.

If your version of Django is older, you could change the password in Django's interactive shell:

>>> from django.contrib.auth.models import User
>>> u = User.objects.get(username='<username>')
>>> u.set_password('<password>')
>>> u.save()
Bernd Petersohn