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 →

Installing Django and creating your first project

  If you have already installed Django, you can skip and jump directly to Creating your first project. If you haven’t installed Django yet, here is a quick guide to installing Django for local development. Django works well with Python versions 2.7 or 3.If you are not sure if Python is installed in your computer, you can verify it by…

Continue Reading →