OpenSlides/openslides/core/management/commands/createsuperuser.py
2015-01-23 15:40:12 +01:00

16 lines
435 B
Python

from django.core.management.base import NoArgsCommand
from openslides.users.api import create_or_reset_admin_user
class Command(NoArgsCommand):
"""
Commands to create or reset the adminuser
"""
def handle_noargs(self, **options):
if create_or_reset_admin_user():
self.stdout.write('Admin user successfully created.')
else:
self.stdout.write('Admin user successfully reset.')