updates the ghuser on login

This commit is contained in:
Jonas Obrist 2012-08-18 17:57:24 +02:00
parent 603c29c8b4
commit 055e10b97e
9 changed files with 166 additions and 62 deletions

View file

@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View file

@ -0,0 +1,8 @@
# -*- 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)

View file

@ -0,0 +1,8 @@
# -*- 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)