Skip to content

Instantly share code, notes, and snippets.

@nigelbabu
Forked from readevalprint/su.py
Created June 22, 2012 16:10
Show Gist options
  • Save nigelbabu/2973746 to your computer and use it in GitHub Desktop.
Save nigelbabu/2973746 to your computer and use it in GitHub Desktop.
make me a super users
# pip this to manage like $ cat su.py | ./manage.py shell
from apps.users.models import User
u = User.objects.get(email="[email protected]")
u.is_staff = True
u.is_superuser = True
u.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment