From db6bd73563f4f688affea655c5e67baf453e5d76 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Sun, 5 Dec 2021 18:42:54 +0100 Subject: [PATCH 1/7] =?UTF-8?q?Update=20verz=C3=AD=20v=20requirements.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3a411faa..3e95b816 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 From 42d5ddc6fb929508ebe0d8ee99fb88068c038ade Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Mon, 31 Jan 2022 20:10:39 +0100 Subject: [PATCH 2/7] =?UTF-8?q?P=C5=99id=C3=A1n=20parametr,=20kter=C3=BD?= =?UTF-8?q?=20je=20=C3=BApln=C4=9B=20k=20ni=C4=8Demu=20:-)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit env/lib/python3.9/site-packages/django/contrib/admin/checks.py:1099: RemovedInDjango30Warning: Update Seznam_PrednaskaInline.has_add_permission() to accept a positional `obj` argument. --- prednasky/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): From b6327b03d2480f8ec320def8d3843304fd79582b Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Mon, 31 Jan 2022 20:36:14 +0100 Subject: [PATCH 3/7] =?UTF-8?q?Dal=C5=A1=C3=AD=20ne-zm=C4=9Bna=20:-)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/settings_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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' From 359613463f7274fb39a6f5ce6d7b448dbf2f021b Mon Sep 17 00:00:00 2001 From: MaM Web user Date: Mon, 31 Jan 2022 21:05:59 +0100 Subject: [PATCH 4/7] =?UTF-8?q?Statick=C3=A9=20soubory=20se=20na=C4=8D?= =?UTF-8?q?=C3=ADtaj=C3=AD=20jinak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Velké sedování :-) --- korektury/templates/korektury/help.html | 2 +- korektury/templates/korektury/opraf.html | 2 +- korektury/templates/korektury/seskupeny_seznam.html | 2 +- korektury/templates/korektury/seznam.html | 2 +- mamweb/templates/400.html | 2 +- mamweb/templates/403.html | 2 +- mamweb/templates/404.html | 2 +- mamweb/templates/500.html | 2 +- mamweb/templates/admin/base_site.html | 2 +- mamweb/templates/base.html | 2 +- mamweb/templates/logo.html | 2 +- odevzdavatko/templates/odevzdavatko/nahraj_reseni.html | 2 +- odevzdavatko/templates/odevzdavatko/posli_reseni.html | 2 +- personalni/templates/personalni/profil/resitel.html | 2 +- personalni/templates/personalni/udaje/edit.html | 2 +- personalni/templates/personalni/udaje/prihlaska.html | 2 +- prednasky/templates/prednasky/base.html | 2 +- prednasky/templates/prednasky/hotovo.html | 2 +- seminar/templates/seminar/archiv/obalky.tex | 2 +- seminar/templates/seminar/jak-resit.html | 2 +- seminar/templates/seminar/pracuje_se.html | 2 +- seminar/templates/seminar/titulnistrana.html | 2 +- treenode/templates/treenode/orphanage.html | 2 +- various/autentizace/templates/autentizace/login.html | 2 +- various/autentizace/templates/autentizace/logout.html | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/korektury/templates/korektury/help.html b/korektury/templates/korektury/help.html index 1ab82743..86a675ea 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 title %} Nápověda ke korekturovátku {% endblock title %} 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 1244eb45..6fc3f08b 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%} diff --git a/korektury/templates/korektury/seznam.html b/korektury/templates/korektury/seznam.html index 57823f6e..f7c58181 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/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 c5c12271..cfd857e0 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 1ca47bc1..7fbc0c8f 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 54a4a865..2d85212d 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 e39f5144..c071e76d 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 a0cbea15..58c1b2ac 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/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/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 edb98cd5..def0b951 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 81e522d5..7167492f 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 94374520..b4c282bf 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 d845dc3a..0b47c027 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 %} From 04975f4a8cc75a707f8edca4f1f857ed712216d2 Mon Sep 17 00:00:00 2001 From: MaM Web user Date: Mon, 31 Jan 2022 21:37:51 +0100 Subject: [PATCH 5/7] =?UTF-8?q?Umo=C5=BEnit=20i=20neseskupen=C3=BD=20sezna?= =?UTF-8?q?m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- korektury/urls.py | 1 + 1 file changed, 1 insertion(+) 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'), ] From f3077d4f6e505726ce07d38b8b9cc477c27d4d2b Mon Sep 17 00:00:00 2001 From: MaM Web user Date: Mon, 31 Jan 2022 21:47:17 +0100 Subject: [PATCH 6/7] =?UTF-8?q?Fallback=20k=20rozbit=C3=A9mu=20seskupov?= =?UTF-8?q?=C3=A1n=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- korektury/templates/korektury/seskupeny_seznam.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/korektury/templates/korektury/seskupeny_seznam.html b/korektury/templates/korektury/seskupeny_seznam.html index 6fc3f08b..c4860527 100644 --- a/korektury/templates/korektury/seskupeny_seznam.html +++ b/korektury/templates/korektury/seskupeny_seznam.html @@ -32,6 +32,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 %} From d4717bb1d226065d4ca1f92e7cc8a8e95fd1a779 Mon Sep 17 00:00:00 2001 From: MaM Web user Date: Mon, 31 Jan 2022 22:11:19 +0100 Subject: [PATCH 7/7] =?UTF-8?q?Oprava=20seskupov=C3=A1n=C3=AD=20korektur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Posunul jsem definici celého view níž, aby šlo snáz použít v případě debugování seznam zastaralých PDF :-) Taky jsem přepsal mezery na taby --- korektury/templates/korektury/seskupeny_seznam.html | 2 +- korektury/views.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/korektury/templates/korektury/seskupeny_seznam.html b/korektury/templates/korektury/seskupeny_seznam.html index c4860527..21768551 100644 --- a/korektury/templates/korektury/seskupeny_seznam.html +++ b/korektury/templates/korektury/seskupeny_seznam.html @@ -15,7 +15,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 }} 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