LEdoian 6 years ago
parent
commit
d4317ae9f2
  1. 2
      seminar/management/commands/auth.py
  2. 2
      seminar/management/commands/testdata.py

2
seminar/management/commands/auth.py

@ -11,7 +11,7 @@ class Command(BaseCommand):
uložen v cookie sessionid) a pokud session existuje a příslušný přihlášený
uživatel právo přihlásit se do admina, vypíše jeho username.
"""
def handle_noargs(self, **options):
def handle(self, *args, **options):
session_key = raw_input()
s = Session.objects.get(pk=session_key).get_decoded()
user_id = s['_auth_user_id']

2
seminar/management/commands/testdata.py

@ -17,7 +17,7 @@ User = django.contrib.auth.get_user_model()
class Command(BaseCommand):
help = "Clear database and load testing data."
def handle_noargs(self, **options):
def handle(self, *args, **options):
assert settings.DEBUG == True
dbfile = settings.DATABASES['default']['NAME']
if os.path.exists(dbfile):

Loading…
Cancel
Save