How to reset Django admin password?

Open console using. 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 recognise your username from the list: usr = User.objects.get(username=’your username’) usr.set_password(‘raw password’) usr.save()        

Continue Reading →

Creating an administration site for your models in Django

Django comes with a built-in administration interface that is very useful for editing content. The Django admin site is built dynamically by reading your model metadata and providing a production-ready interface for editing content. You can use it out-of-the-box, configuring how you want your models to be displayed in it. Remember that django.contrib.admin is already included in the INSTALLED_APPS setting…

Continue Reading →