rogueojiiofwales/githubnetwork/management/commands/revoke_admin.py
2012-08-18 17:57:24 +02:00

8 lines
282 B
Python

# -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand
class Command(BaseCommand):
def handle(self, username, **option):
User.objects.filter(username=username).update(is_staff=False, is_superuser=False)