diff --git a/aesop/views.py b/aesop/views.py index c46ab605..d815b5d5 100644 --- a/aesop/views.py +++ b/aesop/views.py @@ -7,7 +7,7 @@ from django.utils.encoding import force_text from .utils import default_ovvpfile from seminar.models import Rocnik, Soustredeni -from seminar.views import vysledkovka +from vysledkovky import utils from seminar.utils import aktivniResitele class ExportIndexView(generic.View): @@ -66,8 +66,8 @@ class ExportRocnikView(generic.View): rocnik = get_object_or_404(Rocnik, prvni_rok=pr, exportovat=True) cislo = rocnik.posledni_zverejnena_vysledkovka_cislo() resitele = aktivniResitele(cislo, True) - slovnik_body = vysledkovka.secti_body_za_rocnik(cislo, resitele, False) - setrizeni_resitele, body = vysledkovka.setrid_resitele_a_body(slovnik_body) + slovnik_body = utils.secti_body_za_rocnik(cislo, resitele, False) + setrizeni_resitele, body = utils.setrid_resitele_a_body(slovnik_body) of = default_ovvpfile('MaM.rocnik', rocnik) of.headers['comment'] = u'MaM-Web export aktivnich resitelu rocniku {rocnik} do cisla {cislo}'.format(rocnik=rocnik, cislo=cislo) diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 3c850245..ce028bc2 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -79,6 +79,7 @@ TEMPLATES = [ 'django.contrib.messages.context_processors.messages', 'sekizai.context_processors.sekizai', 'header_fotky.context_processors.vzhled', + 'various.context_processors.rozliseni', 'various.context_processors.april', ) }, @@ -109,9 +110,7 @@ INSTALLED_APPS = ( 'dal', 'dal_select2', - 'fluent_comments', 'crispy_forms', - 'threadedcomments', 'django_comments', 'django.contrib.flatpages', @@ -138,6 +137,11 @@ INSTALLED_APPS = ( 'various.autentizace', 'api', 'aesop', + 'odevzdavatko', + 'vysledkovky', + 'personalni', + 'soustredeni', + 'treenode', # Admin upravy: @@ -216,12 +220,6 @@ REST_FRAMEWORK = { 'PAGE_SIZE': 100 } -# Comments - -COMMENTS_APP = 'fluent_comments' -#COMMENTS_APP = 'threadedcomments' -FLUENT_COMMENTS_EXCLUDE_FIELDS = ('name', 'email', 'url', 'title') - # SECURITY WARNING: keep the secret key used in production secret! # Create file 'django.secret' in every install (it is not kept in git) diff --git a/mamweb/settings_local.py b/mamweb/settings_local.py index 0aadd27e..85058c9f 100644 --- a/mamweb/settings_local.py +++ b/mamweb/settings_local.py @@ -97,3 +97,4 @@ LOGGING = { # E-maily posílat chceme, ale do terminálu :-) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' SEND_EMAIL_NOTIFICATIONS = True +LOCAL_TEST_PROD = "local" diff --git a/mamweb/settings_prod.py b/mamweb/settings_prod.py index 0374d88b..e674ab05 100644 --- a/mamweb/settings_prod.py +++ b/mamweb/settings_prod.py @@ -67,3 +67,4 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/ # E-MAIL NOTIFICATIONS POSLI_MAILOVOU_NOTIFIKACI = True +LOCAL_TEST_PROD = "prod" diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py index f8fd844e..365664d2 100644 --- a/mamweb/settings_test.py +++ b/mamweb/settings_test.py @@ -76,3 +76,4 @@ EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend' # TODO Pouze na otestování testu… Zvolit konferu! # XXX: Je to pole, protože implementační detail backendu. TESTOVACI_EMAILOVA_KONFERENCE = ['betatest@mam.mff.cuni.cz'] +LOCAL_TEST_PROD = "test" diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index 8b19fb80..26baccbd 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -1182,3 +1182,21 @@ div.gdpr { label[for=id_skola] { font-weight: bold; } + +.localweb { + border-left: 20px solid greenyellow; + border-right: 20px solid greenyellow; +} + +.localweb .login-bar { + margin-left: -20px; +} + +.testweb { + border-left: 20px solid darkorange; + border-right: 20px solid darkorange; +} + +.testweb .login-bar { + margin-left: -20px; +} diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html index dfd8362e..85cb9e12 100644 --- a/mamweb/templates/base.html +++ b/mamweb/templates/base.html @@ -15,9 +15,6 @@ - - - {# nastavení MathJaxu, aby nahrazoval i matiku obalenou jednoduchými $ #} + {% endblock %} {% block content %} diff --git a/seminar/templates/seminar/org/vloz_reseni.html b/odevzdavatko/templates/odevzdavatko/posli_reseni.html similarity index 88% rename from seminar/templates/seminar/org/vloz_reseni.html rename to odevzdavatko/templates/odevzdavatko/posli_reseni.html index fa537cd9..2a6a2566 100644 --- a/seminar/templates/seminar/org/vloz_reseni.html +++ b/odevzdavatko/templates/odevzdavatko/posli_reseni.html @@ -3,7 +3,6 @@ {% block script %} {{form.media}} - {% endblock %} {% block content %} diff --git a/seminar/templates/seminar/odevzdavatko/resitel_prehled.html b/odevzdavatko/templates/odevzdavatko/prehled_reseni.html similarity index 79% rename from seminar/templates/seminar/odevzdavatko/resitel_prehled.html rename to odevzdavatko/templates/odevzdavatko/prehled_reseni.html index 773aa2a3..ae3d45a9 100644 --- a/seminar/templates/seminar/odevzdavatko/resitel_prehled.html +++ b/odevzdavatko/templates/odevzdavatko/prehled_reseni.html @@ -23,9 +23,9 @@ {% for hodn in hodnoceni %}