diff --git a/.gitignore b/.gitignore
index 05e728bd..2e79367e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,8 +25,11 @@ TODO
# .htpasswd kvůli přihlášení
.htpasswd
+# .htpasswd pro AESOPa
+/.htpasswd-aesop
+
# reversion kvůli historii objektů v reversion
**/reversion
# pro lidi, co programují v nástrojích od JetBrains
-.idea
\ No newline at end of file
+.idea
diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py
index e8af9a88..a16b36bf 100644
--- a/mamweb/settings_test.py
+++ b/mamweb/settings_test.py
@@ -67,3 +67,5 @@ LOGGING['loggers']['']['handlers'] = ['console', 'mail_admins']
LOGGING['loggers']['django']['handlers'] = ['console', 'mail_admins']
LOGGING['handlers']['registration_logfile']['filename'] = '/home/mam-web/logs/test/registration.log'
LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/test/registration_errors.log'
+
+FILE_UPLOAD_PERMISSIONS = 0o440
diff --git a/mamweb/static/images/graf/fyzika.JPG b/mamweb/static/images/graf/fyzika.JPG
new file mode 100644
index 00000000..dc80ab70
Binary files /dev/null and b/mamweb/static/images/graf/fyzika.JPG differ
diff --git a/mamweb/static/images/graf/informatika.jpg b/mamweb/static/images/graf/informatika.jpg
new file mode 100644
index 00000000..43fb342e
Binary files /dev/null and b/mamweb/static/images/graf/informatika.jpg differ
diff --git a/mamweb/static/images/graf/matematika.jpg b/mamweb/static/images/graf/matematika.jpg
new file mode 100644
index 00000000..f27ab16f
Binary files /dev/null and b/mamweb/static/images/graf/matematika.jpg differ
diff --git a/mamweb/templates/graph.svg b/mamweb/templates/graph.svg
index 00bdee27..0d38f0f5 100644
--- a/mamweb/templates/graph.svg
+++ b/mamweb/templates/graph.svg
@@ -408,8 +408,7 @@
y="597.18036">Články
-
body[i]:
posledni_body = body[i]
diff --git a/seminar/models.py b/seminar/models.py
index 654a3b23..f7c6ec46 100644
--- a/seminar/models.py
+++ b/seminar/models.py
@@ -680,6 +680,17 @@ class Cislo(SeminarModelBase):
# Neexistující *Node nemá smysl aktualizovat.
pass
+ def clean(self):
+ # Finální deadline má být až poslední a je povinný, pokud nějaký deadline existuje.
+ # Existence:
+ if self.datum_deadline is None and (self.datum_preddeadline is not None or self.datum_deadline_soustredeni is not None):
+ raise ValidationError({'datum_deadline': "Číslo musí mít finální deadline, pokud má nějaké deadliny"})
+ if self.datum_deadline is not None:
+ if self.datum_preddeadline is not None and self.datum_preddeadline > self.datum_deadline:
+ raise ValidationError({'datum_preddeadline': "Předdeadline musí předcházet finálnímu deadlinu"})
+ if self.datum_deadline_soustredeni is not None and self.datum_deadline_soustredeni > self.datum_deadline:
+ raise ValidationError({'datum_deadline_soustredeni': "Soustřeďkový deadline musí předcházet finálnímu deadlinu"})
+
@reversion.register(ignore_duplicates=True)
class Organizator(SeminarModelBase):
# zmena dedicnosti z models.Model na SeminarModelBase, potencialni vznik bugu
diff --git a/seminar/templates/seminar/archiv/cislo_vysledkovka.tex b/seminar/templates/seminar/archiv/cislo_vysledkovka.tex
index b374864c..38eeea01 100644
--- a/seminar/templates/seminar/archiv/cislo_vysledkovka.tex
+++ b/seminar/templates/seminar/archiv/cislo_vysledkovka.tex
@@ -1,6 +1,6 @@
\setlength{\tabcolsep}{3pt}
\begin{longtable}{|r|l|c|r|{% for p in problemy %}c@{\hskip.5em}{% endfor %}|r|r|}\hline
-& & & & \multicolumn{ {{ problemy|length}} }{c|}{\textbf{Úlohy}} & & \\\textbf{Poř.}& \textbf{Jméno}& \textbf{R.}& \raisebox{0.7mm}{$\sum_{-1}$}& {% for p in problemy %}\textbf{ {{ p.kod_v_rocniku }} }&{% endfor %}\raisebox{0.7mm}{$\sum_0$}&\raisebox{0.7mm}{$\sum_1$}\\\hline
+& & & & \multicolumn{ {{ problemy|length}} }{c|}{\textbf{Témata}} & & \\\textbf{Poř.}& \textbf{Jméno}& \textbf{R.}& \raisebox{0.7mm}{$\sum_{-1}$}& {% for p in problemy %}\textbf{ {{ p.kod_v_rocniku }} }&{% endfor %}\raisebox{0.7mm}{$\sum_0$}&\raisebox{0.7mm}{$\sum_1$}\\\hline
\endhead
\hline
\endfoot
diff --git a/seminar/urls.py b/seminar/urls.py
index 2818f1c9..995f4047 100644
--- a/seminar/urls.py
+++ b/seminar/urls.py
@@ -71,17 +71,17 @@ urlpatterns = [
# Aesop
path(
'aesop-export/mam-rocnik-.csv',
- org_required(export.ExportRocnikView.as_view()),
+ export.ExportRocnikView.as_view(),
name='seminar_export_rocnik'
),
path(
'aesop-export/mam-sous-.csv',
- org_required(export.ExportSousView.as_view()),
+ export.ExportSousView.as_view(),
name='seminar_export_sous'
),
path(
'aesop-export/index.csv',
- org_required(export.ExportIndexView.as_view()),
+ export.ExportIndexView.as_view(),
name='seminar_export_index'
),
@@ -134,7 +134,9 @@ urlpatterns = [
path('prihlaska/',views.prihlaskaView, name='seminar_prihlaska'),
path('prihlasit/', views.LoginView.as_view(), name='login'),
+ path('login/', RedirectView.as_view(pattern_name='login', permanent=True, query_string=True)),
path('odhlasit/', views.LogoutView.as_view(), name='logout'),
+ path('logout/', RedirectView.as_view(pattern_name='login', permanent=True, query_string=True)),
path('resitel/', resitel_required(views.ResitelView.as_view()), name='seminar_resitel'),
path('resitel/odevzdana_reseni/', resitel_required(views.PrehledOdevzdanychReseni.as_view()), name='seminar_resitel_odevzdana_reseni'),
path('reset-hesla/', views.PasswordResetView.as_view(), name='reset_password'),