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

8 lines
280 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=True, is_superuser=True)