OpenSlides/server/openslides/users/management/commands/createsuperuser.py
FinnStutzenstein 2bcab5d098
Repository restructure
- moved all server related things into the folder `server`, so this
configuration is parallel to the client.
- All main "services" are now folders in the root directory
- Added Dockerfiles to each service (currently server and client)
- Added a docker compose configuration to start everything together.
Currently there are heavy dependencies into https://github.com/OpenSlides/openslides-docker-compose
- Resturctured the .gitignore. If someone needs something excluded,
please add it to the right section.
- Added initial build setup with Docker and docker-compose.
- removed setup.py. We won't deliver OpenSlides via pip anymore.
2020-08-21 08:11:13 +02:00

19 lines
506 B
Python

from django.core.management.base import BaseCommand
from ...models import User
class Command(BaseCommand):
"""
Command to create or reset the admin user.
"""
help = "Creates or resets the admin user."
def handle(self, *args, **options):
created = User.objects.create_or_reset_admin_user(skip_autoupdate=True)
if created:
self.stdout.write("Admin user successfully created.")
else:
self.stdout.write("Admin user successfully reset.")