8 lines
282 B
Python
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)
|