diff --git a/korektury/templates/korektury/help.html b/korektury/templates/korektury/help.html index bce5afd4..deb871f6 100644 --- a/korektury/templates/korektury/help.html +++ b/korektury/templates/korektury/help.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block content %} diff --git a/korektury/templates/korektury/opraf.html b/korektury/templates/korektury/opraf.html index 7fe440f9..c7a97317 100644 --- a/korektury/templates/korektury/opraf.html +++ b/korektury/templates/korektury/opraf.html @@ -1,4 +1,4 @@ -{% load staticfiles %} +{% load static %} diff --git a/korektury/templates/korektury/seskupeny_seznam.html b/korektury/templates/korektury/seskupeny_seznam.html index 2e585f72..b83a51be 100644 --- a/korektury/templates/korektury/seskupeny_seznam.html +++ b/korektury/templates/korektury/seskupeny_seznam.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block script%} @@ -13,7 +13,7 @@ {% endblock nadpis1a %} -{% regroup object_list|dictsortreversed:"cislo_a_tema" by cislo_a_tema as seskupeny_list %} +{% regroup object_list by cislo_a_tema as seskupeny_list %} {% for skupina in seskupeny_list %} {{ skupina.grouper }} @@ -30,6 +30,8 @@
  • Nejsou žádné dokumenty ke korekturování. {% endfor %} +{% empty %} +

    Nejspíš se nepodařilo seskupit korektury podle čísel. Napiš prosím webařům a mezitím použij neseskupený seznam.

    {% endfor %} diff --git a/korektury/templates/korektury/seznam.html b/korektury/templates/korektury/seznam.html index 39d30cf4..93299c36 100644 --- a/korektury/templates/korektury/seznam.html +++ b/korektury/templates/korektury/seznam.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block script%} diff --git a/korektury/urls.py b/korektury/urls.py index 14772122..dcd1d965 100644 --- a/korektury/urls.py +++ b/korektury/urls.py @@ -4,6 +4,7 @@ from . import views urlpatterns = [ path('korektury/', org_required(views.KorekturySeskupeneListView.as_view()), name='korektury_list'), + path('korektury/neseskupene/', org_required(views.KorekturyAktualniListView.as_view()), name='korektury_neseskupene_list'), path('korektury/zastarale/', org_required(views.KorekturyZastaraleListView.as_view()), name='korektury_stare_list'), path('korektury//', org_required(views.KorekturyView.as_view()), name='korektury'), ] diff --git a/korektury/views.py b/korektury/views.py index b07a1e33..97a34dbf 100644 --- a/korektury/views.py +++ b/korektury/views.py @@ -41,9 +41,6 @@ class KorekturyAktualniListView(KorekturyListView): return context -class KorekturySeskupeneListView(KorekturyAktualniListView): - template_name = 'korektury/seskupeny_seznam.html' - class KorekturyZastaraleListView(KorekturyListView): def get_queryset(self, *args, **kwargs): @@ -56,6 +53,14 @@ class KorekturyZastaraleListView(KorekturyListView): context['selected'] = 'zastarale' return context +class KorekturySeskupeneListView(KorekturyAktualniListView): + template_name = 'korektury/seskupeny_seznam.html' + + # {% regroup %} potřebuje dostat správně setříděné názvy, aby nedělal duplikáty + def get_queryset(self, *args, **kwargs): + qs = super().get_queryset(**kwargs) + return qs.order_by('nazev') + ### Korektury class KorekturyView(generic.TemplateView): model = Oprava diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 5b7b257b..3f9edab6 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -348,4 +348,5 @@ class InvalidTemplateVariable(str): return '' TEMPLATES[0]['OPTIONS']['string_if_invalid'] = InvalidTemplateVariable('%s') - +# Django 3.2 vyžaduje explicitní nastavení autoklíče, zatím nechápu proč +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' diff --git a/mamweb/templates/400.html b/mamweb/templates/400.html index 3e7ac409..71d8e651 100644 --- a/mamweb/templates/400.html +++ b/mamweb/templates/400.html @@ -1,6 +1,6 @@ {% extends "error_base.html" %} -{% load staticfiles %} +{% load static %} {% block errorheading %} O-jo-jo-jo-joj diff --git a/mamweb/templates/403.html b/mamweb/templates/403.html index 261c7578..4d8d1931 100644 --- a/mamweb/templates/403.html +++ b/mamweb/templates/403.html @@ -1,6 +1,6 @@ {% extends "error_base.html" %} -{% load staticfiles %} +{% load static %} {% block errorheading %} Vrrrrrrrrr diff --git a/mamweb/templates/404.html b/mamweb/templates/404.html index c44646d4..cb36b119 100644 --- a/mamweb/templates/404.html +++ b/mamweb/templates/404.html @@ -1,6 +1,6 @@ {% extends "error_base.html" %} -{% load staticfiles %} +{% load static %} {% block errorheading %} Požadovaná stránka nenalezena diff --git a/mamweb/templates/500.html b/mamweb/templates/500.html index 3e7ac409..71d8e651 100644 --- a/mamweb/templates/500.html +++ b/mamweb/templates/500.html @@ -1,6 +1,6 @@ {% extends "error_base.html" %} -{% load staticfiles %} +{% load static %} {% block errorheading %} O-jo-jo-jo-joj diff --git a/mamweb/templates/admin/base_site.html b/mamweb/templates/admin/base_site.html index 6bb544d7..b5738832 100644 --- a/mamweb/templates/admin/base_site.html +++ b/mamweb/templates/admin/base_site.html @@ -1,5 +1,5 @@ {% extends "admin/base.html" %} -{% load staticfiles %} +{% load static %} {% block extrahead %} diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html index 9fd5d91a..7c02902f 100644 --- a/mamweb/templates/base.html +++ b/mamweb/templates/base.html @@ -1,4 +1,4 @@ -{% load staticfiles sekizai_tags %} +{% load static sekizai_tags %} {% load sitetree %} diff --git a/mamweb/templates/logo.html b/mamweb/templates/logo.html index c5113d0c..ff0fa6c3 100644 --- a/mamweb/templates/logo.html +++ b/mamweb/templates/logo.html @@ -1,4 +1,4 @@ -{% load staticfiles %} +{% load static %} {% endblock %} diff --git a/odevzdavatko/templates/odevzdavatko/posli_reseni.html b/odevzdavatko/templates/odevzdavatko/posli_reseni.html index 97e534c4..27827015 100644 --- a/odevzdavatko/templates/odevzdavatko/posli_reseni.html +++ b/odevzdavatko/templates/odevzdavatko/posli_reseni.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block script %} {{form.media}} diff --git a/personalni/templates/personalni/profil/resitel.html b/personalni/templates/personalni/profil/resitel.html index c3892f8a..9c933f0a 100644 --- a/personalni/templates/personalni/profil/resitel.html +++ b/personalni/templates/personalni/profil/resitel.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block content %} diff --git a/personalni/templates/personalni/udaje/edit.html b/personalni/templates/personalni/udaje/edit.html index a148c0e4..32a9964c 100644 --- a/personalni/templates/personalni/udaje/edit.html +++ b/personalni/templates/personalni/udaje/edit.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block script %} diff --git a/personalni/templates/personalni/udaje/prihlaska.html b/personalni/templates/personalni/udaje/prihlaska.html index 08b9ddaf..14355760 100644 --- a/personalni/templates/personalni/udaje/prihlaska.html +++ b/personalni/templates/personalni/udaje/prihlaska.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block script %} diff --git a/prednasky/admin.py b/prednasky/admin.py index 2688fffc..c9807b27 100644 --- a/prednasky/admin.py +++ b/prednasky/admin.py @@ -52,7 +52,7 @@ class Seznam_PrednaskaInline(admin.TabularInline): ] exclude = ['prednaska'] - def has_add_permission(self, req): return False + def has_add_permission(self, req, obj): return False class SeznamAdmin(VersionAdmin): diff --git a/prednasky/templates/prednasky/base.html b/prednasky/templates/prednasky/base.html index eea79ad2..a915a04a 100644 --- a/prednasky/templates/prednasky/base.html +++ b/prednasky/templates/prednasky/base.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% load humanize %} -{% load staticfiles %} +{% load static %} {% block content %} diff --git a/prednasky/templates/prednasky/hotovo.html b/prednasky/templates/prednasky/hotovo.html index 3e621b39..f77ea6e1 100644 --- a/prednasky/templates/prednasky/hotovo.html +++ b/prednasky/templates/prednasky/hotovo.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% load humanize %} -{% load staticfiles %} +{% load static %} {% block content %} diff --git a/requirements.txt b/requirements.txt index 796e9f97..c447090d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -c constraints.txt # basic libs -psycopg2<2.9 # Kvůli djangu 2.2, odstranit při přechodu na 3. +psycopg2 html5lib ipython Pillow @@ -13,7 +13,7 @@ Unidecode # Django and modules -Django<2.3 +Django<3.3 #django-bootstrap-sass django-mptt django-reversion @@ -34,14 +34,14 @@ django-webpack-loader django-rest-polymorphic # Comments -django-contrib-comments==1.9.0 +django-contrib-comments # debug tools/extensions -django-debug-toolbar==1.11 -django-extensions==2.1.9 -sqlparse==0.2.4 -Werkzeug==0.14.1 +django-debug-toolbar +django-extensions +sqlparse +Werkzeug # G+, FB authorisation @@ -52,7 +52,7 @@ requests # requests-oauthlib # uWSGI -uWSGI==2.0.17.1 +uWSGI # Potřeba pro test data diff --git a/seminar/templates/seminar/archiv/obalky.tex b/seminar/templates/seminar/archiv/obalky.tex index 1ee9573b..f93cc7cd 100644 --- a/seminar/templates/seminar/archiv/obalky.tex +++ b/seminar/templates/seminar/archiv/obalky.tex @@ -1,5 +1,5 @@ {% autoescape off %} -{% load staticfiles %} +{% load static %} {% load tex %} \documentclass[11pt,a4paper,landscape]{article} \usepackage[top=3.75cm,left=8cm]{geometry} diff --git a/seminar/templates/seminar/jak-resit.html b/seminar/templates/seminar/jak-resit.html index eb7b7259..4404b53e 100644 --- a/seminar/templates/seminar/jak-resit.html +++ b/seminar/templates/seminar/jak-resit.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% load humanize %} -{% load staticfiles %} +{% load static %} {% block content %} diff --git a/seminar/templates/seminar/pracuje_se.html b/seminar/templates/seminar/pracuje_se.html index 66fd923d..1a396534 100644 --- a/seminar/templates/seminar/pracuje_se.html +++ b/seminar/templates/seminar/pracuje_se.html @@ -1,4 +1,4 @@ -{% load staticfiles %} +{% load static %} {% block content %}

    diff --git a/seminar/templates/seminar/titulnistrana.html b/seminar/templates/seminar/titulnistrana.html index 5673e75b..e5e91f1b 100644 --- a/seminar/templates/seminar/titulnistrana.html +++ b/seminar/templates/seminar/titulnistrana.html @@ -10,7 +10,7 @@ function sousdeadline() { {% extends 'base.html' %} {% load humanize %} -{% load staticfiles %} +{% load static %} {% block content %} diff --git a/treenode/templates/treenode/orphanage.html b/treenode/templates/treenode/orphanage.html index 8732b394..6408749e 100644 --- a/treenode/templates/treenode/orphanage.html +++ b/treenode/templates/treenode/orphanage.html @@ -1,5 +1,5 @@ {% extends "seminar/archiv/base.html" %} -{% load staticfiles %} +{% load static %} {% load sekizai_tags %} {# toto z nejakeho duvodu nefunguje #} diff --git a/various/autentizace/templates/autentizace/login.html b/various/autentizace/templates/autentizace/login.html index 396719bb..ec4c380f 100644 --- a/various/autentizace/templates/autentizace/login.html +++ b/various/autentizace/templates/autentizace/login.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block content %} diff --git a/various/autentizace/templates/autentizace/logout.html b/various/autentizace/templates/autentizace/logout.html index 4f354b3b..ad55d280 100644 --- a/various/autentizace/templates/autentizace/logout.html +++ b/various/autentizace/templates/autentizace/logout.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load staticfiles %} +{% load static %} {% block content %}