From 68b9e99cb7fd9e65170c396ad7e3295fdaf6c76c Mon Sep 17 00:00:00 2001 From: Nikolay Zhuravlev Date: Sun, 7 Apr 2024 23:47:26 +0200 Subject: [PATCH] Fix registration form && ALL_PAGES_MESSAGE from env --- anytask/settings_docker.py | 9 +++++---- .../registration/backends/default_with_names/__init__.py | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/anytask/settings_docker.py b/anytask/settings_docker.py index 681ead22..7fda90c0 100644 --- a/anytask/settings_docker.py +++ b/anytask/settings_docker.py @@ -82,10 +82,11 @@ COURSES_WITH_CONTEST_MARKS = [11, 10, 65, 85, 93, 82, 79, 80, 104, 137, 160, 155, 237, 214, 202, 294, 307, 277] -ALL_PAGES_MESSAGE = "" -#ALL_PAGES_MESSAGE = """
Технические работы! Anytask будет недоступен 4 апреля с 21 по 22 МСК. -#Приносим извинения за неудобства. -#
""" +ALL_PAGES_MESSAGE = os.environ.get('ALL_PAGES_MESSAGE', '') +# ALL_PAGES_MESSAGE = """
+# Технические работы! Anytask будет недоступен 4 апреля с 21 по 22 МСК. +# Приносим извинения за неудобства. +#
""" PYTHONTASK_MAX_DAYS_WITHOUT_SCORES = 30 PYTHONTASK_MAX_DAYS_TO_FULL_CANCEL = 2 diff --git a/dependencies/django-registration/registration/backends/default_with_names/__init__.py b/dependencies/django-registration/registration/backends/default_with_names/__init__.py index 10ca0f88..85ca1ece 100644 --- a/dependencies/django-registration/registration/backends/default_with_names/__init__.py +++ b/dependencies/django-registration/registration/backends/default_with_names/__init__.py @@ -21,7 +21,7 @@ from registration.models import RegistrationProfile from crispy_forms.helper import FormHelper -from crispy_forms.layout import Layout, HTML +from crispy_forms.layout import Layout, HTML, Field attrs_dict = { 'class': 'required' } @@ -38,6 +38,7 @@ def __init__(self, *args, **kwargs): self.helper.form_action = '/accounts/login/' self.helper.label_class = 'col-md-4' self.helper.field_class = 'col-md-8' + self.helper.layout = Layout(Field('username', wrapper_class="row"), Field('password', wrapper_class="row")) self.helper.layout.append(HTML(u"""