How to Reset Django Admin Password

May 10th, 2011

django

There is a time when I forgot my password for Django admin. You can create new one using createsuperuser, but if you want to reset your available account you can use django shell :

python manage.py shell

Now, get your account and set new password.

from django.contrib.auth.models import User
 
user = User.objects.get(username='admin')
user.set_password('new_password')
user.save()

That’s it, your new password will get you in.

You can see the other django tips and tricks.

Related posts:

  1. Sending Email Using Gmail Account in Django
  2. Django Tutorial – Simple Notes Application
  3. Getting Started With Django-CMS
  4. Links – Top 10 tips to a new django developer
  5. Django and TinyMCE

Tags: ,

One Comment