diff --git a/openslides/main.py b/openslides/main.py index 9f3f94301..91f4156d3 100644 --- a/openslides/main.py +++ b/openslides/main.py @@ -173,13 +173,15 @@ def create_or_reset_admin_user(): # can't be imported in global scope as it already requires # the settings module during import from django.contrib.auth.models import User + from openslides.config.models import config try: obj = User.objects.get(username = "admin") except User.DoesNotExist: User.objects.create_superuser( - username = "admin", - password = "admin", - email = "admin@example.com") + username="admin", + password="admin", + email="admin@example.com") + config['admin_password'] = "admin" print("Created default admin user") return diff --git a/openslides/participant/templates/participant/login.html b/openslides/participant/templates/participant/login.html index 3723df145..908ed02d8 100644 --- a/openslides/participant/templates/participant/login.html +++ b/openslides/participant/templates/participant/login.html @@ -27,12 +27,20 @@ {% trans "Your username and password were not accepted. Please try again." %} {% endfor %} - {% endif %} + {% if first_time_message %} +