Home > django > Reset django admin password

Reset django admin password

Reset django admin password:

$ ./manage.py shell
>>> from django.contrib.auth.models import User
>>> users = User.objects.all()
>>> users
>>> u=User.objects.get(username__exact='admin')
>>> u.set_password(‘whatever’);
>>> u.save()
Advertisements
Categories: django
  1. September 1, 2014 at 9:31 am

    When some one searches for his vital thing,
    thus he/she wishes to be available that in detail, so that thing is maintained over here.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: