Skip to content

Commit

Permalink
Fix registration form && ALL_PAGES_MESSAGE from env
Browse files Browse the repository at this point in the history
  • Loading branch information
znick committed Apr 7, 2024
1 parent f1b7c23 commit 68b9e99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions anytask/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = """<div class="alert alert-warning">Технические работы! Anytask будет недоступен 4 апреля с 21 по 22 МСК.
#Приносим извинения за неудобства.
#</div>"""
ALL_PAGES_MESSAGE = os.environ.get('ALL_PAGES_MESSAGE', '')
# ALL_PAGES_MESSAGE = """<div class="alert alert-warning">
# Технические работы! Anytask будет недоступен 4 апреля с 21 по 22 МСК.
# Приносим извинения за неудобства.
# </div>"""

PYTHONTASK_MAX_DAYS_WITHOUT_SCORES = 30
PYTHONTASK_MAX_DAYS_TO_FULL_CANCEL = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' }

Expand All @@ -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"""<div class="form-group row" style="margin-bottom: 16px;margin-top: -16px;">
<div class="col-md-offset-4 col-md-8">
<a href="{% url "auth_password_reset" %}"><small class="text-muted">""" + _(u'Забыли пароль?') + """</small></a>
Expand Down

0 comments on commit 68b9e99

Please sign in to comment.