Skip to content

Instantly share code, notes, and snippets.

@saviour123
Created April 9, 2022 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saviour123/7de90e05c7b7f8f027a3bfa51bb3da8e to your computer and use it in GitHub Desktop.
Save saviour123/7de90e05c7b7f8f027a3bfa51bb3da8e to your computer and use it in GitHub Desktop.
creating staff user django
from app.models import Identity
from django.contrib.auth.models import Group
u = Identity.objects.all()
for acc in u:
# group = Group.objects.get(name='assembly_admin')
acc.is_staff = True
# acc.groups.add(group)
acc.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment