head.daveops.net

Snippets for yer computer needs

Django - admin mode

Enabling admin mode

from django.contrib import admin
from app.models import Thing

admin.site.register(Thing)

Reset admin password w/o password reset

./manage.py shell

from django.contrib.auth.models import User
users = User.objects.all()
users
users[0].set_password('whatever');
users[0].save()