Skip to content

Instantly share code, notes, and snippets.

@gnrfan
Created June 7, 2012 09:16
Show Gist options
  • Select an option

  • Save gnrfan/2887784 to your computer and use it in GitHub Desktop.

Select an option

Save gnrfan/2887784 to your computer and use it in GitHub Desktop.
Create another admin account in Django
from django.contrib.auth.models import User
another_admin = User(
username='admin2',
email='admin2@mailinator.com',
is_superuser=True,
is_staff=True
)
another_admin.set_password('password')
another_admin.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment