Posted By

techpop on 06/06/13


Tagged


Versions (?)

reset django admin password


 / Published in: Django
 

lost your django admin password? here's how to reset it.

  1. $ ./manage.py shell
  2. >>> from django.contrib.auth.models import User
  3. >>> users = User.objects.all()
  4. >>> users
  5. >>> u=User.objects.get(username__exact='admin')
  6. >>> u.set_password("whatever");
  7. >>> u.save()

Report this snippet  

You need to login to post a comment.