From 3920ac72aaa66fc16f94193194465123389c0a7a Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Tue, 19 Nov 2024 22:38:34 +0100 Subject: [PATCH 01/11] =?UTF-8?q?Sepsan=C3=A9=20zkratky=20pro=20zdroj?= =?UTF-8?q?=C3=A1ky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/index.rst | 1 + docs/zkratky.rst | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 docs/zkratky.rst diff --git a/docs/index.rst b/docs/index.rst index d06c7e4a..af3b0c12 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,7 @@ Dokumentace (jak v ``docs/``, tak přímo v kódu) je psaná ve zavislosti sphinx skripty + zkratky modules/modules dalsi_soubory zapisy/zapisy diff --git a/docs/zkratky.rst b/docs/zkratky.rst new file mode 100644 index 00000000..95902921 --- /dev/null +++ b/docs/zkratky.rst @@ -0,0 +1,86 @@ +Zkratky aplikací ve zdrojácích +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + +Ve zdrojácích (zejména různé ``models.py``, ``views.py`` ap.) používáme spoustu +modelů. Někdy je praktičtější / někdo preferuje importovat celou aplikaci jako +jedno jméno a používat modely bez explicitních importů, tj:: + + # „hromadné“ importy: + import personalni.models as p + ... + p.Organizator.objects.all() + + # „explicitní“ importy: + from personalni.models import Organizator + ... + Organizator.objects.all() + +Na webschůzce 2024-11-05 jsme na toto téma otevřeli diskusi, tady je její závěr. + +.. admonition:: Historické okénko + :class: note + + Kdysi jsme měli (prakticky) všechny modely v jedné aplikaci, ``seminar``. Na + různých místech se pak ``seminar.models`` importovalo typicky jako ``s`` + nebo jako ``m``. + + Přirozeně, toto už nejde tak snadno, protože už neexistuje jedno místo, ze + kterého chceme tahat modely v kódu. + +Konvence +======== + +Shodli jsme se, že nám rozhodně nevadí explicitní importy a z pohledu +čitelnosti je preferujeme. Nicméně při psaní kódu to některým webařům přijde +nepohodlné, takže očekáváme, že bude existovat spousta kódu, která bude chtít +importovat hromadně. Usnesli jsme se proto na následujících kanonických +zkratkách, aby se aplikace alespoň zkracovaly konzistentně. + +V závorkách je uvedené případné jméno, ale nepředpokládáme, že někdo bude danou +aplikaci chtít importovat hromadně. Některé aplikace zkratku nemají, ty se +importují vždy pod plným jménem nebo explicitně. + +.. list-table:: + :header-rows: 1 + + * - Model + - Zkratka + * - ``aesop`` + - --- + * - ``api`` + - --- (``api``) + * - ``galerie`` + - ``g`` + * - ``header_fotky`` + - --- (``hdr``) + * - ``korektury`` + - ``kor`` + * - ``novinky`` + - ``nov`` + * - ``odevzdavatko`` + - ``odev`` + * - ``personální`` + - ``pers``/``p`` + * - ``sifrovacka`` + - (``sifr``) + * - ``soustredeni`` + - ``sou`` + * - ``treenode`` + - ``tn`` + * - ``tvorba`` + - ``tv`` + * - ``various`` + - ``v``/``var`` + * - ``vyroci`` + - --- + * - ``vysledkovky`` + - ``vysl`` + + +.. admonition:: O všech modelech pod jedním jménem + :class: warning + + Historické okénko výš zatajuje jeden detail: Při práci v shellu se hodí mít + modely k dispozici a nemuset přemýšlet nad dělením do aplikací, takže ve + skutečnosti existuje ``mamweb.vsechno``, jenž všechny modely obsahuje. + Z čitelnostních důvodů je ale *zakázáno* tento modul používat v kódu. From 36b261580c9f0c17958f99b7826f695050260a54 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Tue, 19 Nov 2024 22:38:46 +0100 Subject: [PATCH 02/11] =?UTF-8?q?Aktualizace=20toho,=20jak=20se=20pou?= =?UTF-8?q?=C5=BE=C3=ADv=C3=A1=20Sphinx=20u=20n=C3=A1s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/sphinx.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/sphinx.rst b/docs/sphinx.rst index 6a9b7a53..67ea440b 100644 --- a/docs/sphinx.rst +++ b/docs/sphinx.rst @@ -1,13 +1,15 @@ Sphinx na našem webu ==================== -Dokumentace se zkompiluje příkazem ``make html`` ve složce ``doc``. +Dokumentace se zkompiluje příkazem ``make html`` ve složce ``docs``. Složka ``modules`` je automaticiky generována a přegenerovávána. (**Nic v ní neupravovat!**) -Jinak všechny rst, co jsou ve složce ``doc`` a jejích podsložkách nezačínajících podtržítkem, budou v dokumentaci a to je přesně to, co editovat pro změnu dokumentace (kromě dokumentace přímo v Pythonu). +Jinak všechny rst, co jsou ve složce ``docs`` a jejích podsložkách nezačínajících podtržítkem, budou v dokumentaci a to je přesně to, co editovat pro změnu dokumentace (kromě dokumentace přímo v Pythonu). Sphinx se píše v rst: `Návod na syntaxi rst`_ `Cheat sheet`_ +Pokud něco chcete protlačit do bočního meníčka, je potřeba to připsat do souboru ``docs/index.rst`` (Zatím není úplně konsensus nad tím, co tam má a nemá být, takže pokud si nejste jistí, cpěte tam *všechno* ☺) + To je snad vše, co je potřeba vědět k dokumentaci mamwebu. Následující sekce jsou o tom, co jsem provedl Sphinxu, aby to fungovalo: .. _Návod na syntaxi rst: https://sphinx-tutorial.readthedocs.io/step-1/#sections From 5f87045b315c4a3de2aa332ca6c6549454811ab6 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Tue, 19 Nov 2024 22:39:18 +0100 Subject: [PATCH 03/11] =?UTF-8?q?Je=C5=A1t=C4=9B=20jedna=20aktualizace=20:?= =?UTF-8?q?-)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/sphinx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx.rst b/docs/sphinx.rst index 67ea440b..b450375c 100644 --- a/docs/sphinx.rst +++ b/docs/sphinx.rst @@ -1,7 +1,7 @@ Sphinx na našem webu ==================== -Dokumentace se zkompiluje příkazem ``make html`` ve složce ``docs``. +Dokumentace se zkompiluje příkazem ``make html`` ve složce ``docs``. (Musíte mít zapnutý virtualenv) Složka ``modules`` je automaticiky generována a přegenerovávána. (**Nic v ní neupravovat!**) Jinak všechny rst, co jsou ve složce ``docs`` a jejích podsložkách nezačínajících podtržítkem, budou v dokumentaci a to je přesně to, co editovat pro změnu dokumentace (kromě dokumentace přímo v Pythonu). From 0aee5b9bdb723a9a92095d7829aee31d67b68553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 26 Nov 2024 19:33:44 +0100 Subject: [PATCH 04/11] =?UTF-8?q?=C5=98e=C5=A1itelsk=C3=BD=20r=C3=A1me?= =?UTF-8?q?=C4=8Dek=20(aneb=20resitel-only;=20pro=20neve=C5=99ejn=C3=A9=20?= =?UTF-8?q?v=C4=9Bci=20=C5=99e=C5=A1itele)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/static/css/constants.css | 2 ++ mamweb/static/css/modules.css | 16 ++++++++++++++++ .../soustredeni/seznam_soustredeni.html | 16 ++++++++++------ 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/mamweb/static/css/constants.css b/mamweb/static/css/constants.css index 959897b4..361e01dc 100644 --- a/mamweb/static/css/constants.css +++ b/mamweb/static/css/constants.css @@ -10,6 +10,8 @@ --orgovska-fialova: #6a0043; --orgovska-svetla-fialova: #eee4ec; + --resitelska-fialova: #f296b3; + --resitelska-svetla-fialova: #f2E5EF; --barva-pozadi: #fffbf6; } diff --git a/mamweb/static/css/modules.css b/mamweb/static/css/modules.css index 6f612f27..56cda331 100644 --- a/mamweb/static/css/modules.css +++ b/mamweb/static/css/modules.css @@ -25,6 +25,22 @@ margin: -2px 0; } } + +.mam-resitel-only { + background: var(--resitelska-svetla-fialova); + padding: 10px; + margin: 10px -10px; + border: var(--resitelska-fialova) 2px dashed; + + & .mam-resitel-only { + border: 0; + } + + & li { + padding: 3px 0; + margin: -2px 0; + } +} /**********************************/ diff --git a/soustredeni/templates/soustredeni/seznam_soustredeni.html b/soustredeni/templates/soustredeni/seznam_soustredeni.html index 7ba6cd29..c35ebd88 100644 --- a/soustredeni/templates/soustredeni/seznam_soustredeni.html +++ b/soustredeni/templates/soustredeni/seznam_soustredeni.html @@ -36,12 +36,16 @@ {% endfor %} {% endif %} - {% for i in soustredeni.ucastnici.all %} - {% if i.osoba.user == user %} - {% if soustredeni.kontaktnicek_pdf %}
  • kontaktnicek pdf
  • {% endif %} - {% if soustredeni.kontaktnicek_vcf %}
  • kontaktnicek vcf
  • {% endif %} - {% endif %} - {% endfor %} + {% if soustredeni.kontaktnicek_pdf or soustredeni.kontaktnicek_vcf %} +
    + {% for i in soustredeni.ucastnici.all %} + {% if i.osoba.user == user %} + {% if soustredeni.kontaktnicek_pdf %}
  • kontaktnicek pdf
  • {% endif %} + {% if soustredeni.kontaktnicek_vcf %}
  • kontaktnicek vcf
  • {% endif %} + {% endif %} + {% endfor %} +
    + {% endif %} {% if user.je_org %} From 80b20f529064758e60bbfc7c75ad99ef2a4fd353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 26 Nov 2024 20:05:49 +0100 Subject: [PATCH 05/11] =?UTF-8?q?Pr=C3=A1va=20v=20data/*=20a=20na=C4=8D?= =?UTF-8?q?=C3=ADtan=C3=A9=20pomoc=C3=AD=20./manage.py=20loaddata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy_v2/admin_org_prava.json | 622 ------------------ deploy_v2/full_redeploy.sh | 1 - make/init_local | 1 - .../commands/load_org_permissions.py | 30 - 4 files changed, 654 deletions(-) delete mode 100644 deploy_v2/admin_org_prava.json delete mode 100644 various/management/commands/load_org_permissions.py diff --git a/deploy_v2/admin_org_prava.json b/deploy_v2/admin_org_prava.json deleted file mode 100644 index c7fc8c7d..00000000 --- a/deploy_v2/admin_org_prava.json +++ /dev/null @@ -1,622 +0,0 @@ -[ - { - "codename": "org", - "ct_app_label": "auth", - "ct_model": "user" - }, - { - "codename": "add_flatpage", - "ct_app_label": "flatpages", - "ct_model": "flatpage" - }, - { - "codename": "change_flatpage", - "ct_app_label": "flatpages", - "ct_model": "flatpage" - }, - { - "codename": "delete_flatpage", - "ct_app_label": "flatpages", - "ct_model": "flatpage" - }, - { - "codename": "view_flatpage", - "ct_app_label": "flatpages", - "ct_model": "flatpage" - }, - { - "codename": "add_galerie", - "ct_app_label": "galerie", - "ct_model": "galerie" - }, - { - "codename": "change_galerie", - "ct_app_label": "galerie", - "ct_model": "galerie" - }, - { - "codename": "delete_galerie", - "ct_app_label": "galerie", - "ct_model": "galerie" - }, - { - "codename": "view_galerie", - "ct_app_label": "galerie", - "ct_model": "galerie" - }, - { - "codename": "add_obrazek", - "ct_app_label": "galerie", - "ct_model": "obrazek" - }, - { - "codename": "change_obrazek", - "ct_app_label": "galerie", - "ct_model": "obrazek" - }, - { - "codename": "delete_obrazek", - "ct_app_label": "galerie", - "ct_model": "obrazek" - }, - { - "codename": "view_obrazek", - "ct_app_label": "galerie", - "ct_model": "obrazek" - }, - { - "codename": "add_fotkaheader", - "ct_app_label": "header_fotky", - "ct_model": "fotkaheader" - }, - { - "codename": "change_fotkaheader", - "ct_app_label": "header_fotky", - "ct_model": "fotkaheader" - }, - { - "codename": "view_fotkaheader", - "ct_app_label": "header_fotky", - "ct_model": "fotkaheader" - }, - { - "codename": "add_fotkaurlvazba", - "ct_app_label": "header_fotky", - "ct_model": "fotkaurlvazba" - }, - { - "codename": "change_fotkaurlvazba", - "ct_app_label": "header_fotky", - "ct_model": "fotkaurlvazba" - }, - { - "codename": "view_fotkaurlvazba", - "ct_app_label": "header_fotky", - "ct_model": "fotkaurlvazba" - }, - { - "codename": "add_komentar", - "ct_app_label": "korektury", - "ct_model": "komentar" - }, - { - "codename": "change_komentar", - "ct_app_label": "korektury", - "ct_model": "komentar" - }, - { - "codename": "delete_komentar", - "ct_app_label": "korektury", - "ct_model": "komentar" - }, - { - "codename": "view_komentar", - "ct_app_label": "korektury", - "ct_model": "komentar" - }, - { - "codename": "add_korekturovanepdf", - "ct_app_label": "korektury", - "ct_model": "korekturovanepdf" - }, - { - "codename": "change_korekturovanepdf", - "ct_app_label": "korektury", - "ct_model": "korekturovanepdf" - }, - { - "codename": "delete_korekturovanepdf", - "ct_app_label": "korektury", - "ct_model": "korekturovanepdf" - }, - { - "codename": "view_korekturovanepdf", - "ct_app_label": "korektury", - "ct_model": "korekturovanepdf" - }, - { - "codename": "add_oprava", - "ct_app_label": "korektury", - "ct_model": "oprava" - }, - { - "codename": "change_oprava", - "ct_app_label": "korektury", - "ct_model": "oprava" - }, - { - "codename": "delete_oprava", - "ct_app_label": "korektury", - "ct_model": "oprava" - }, - { - "codename": "view_oprava", - "ct_app_label": "korektury", - "ct_model": "oprava" - }, - { - "codename": "add_hlasovani", - "ct_app_label": "prednasky", - "ct_model": "hlasovani" - }, - { - "codename": "change_hlasovani", - "ct_app_label": "prednasky", - "ct_model": "hlasovani" - }, - { - "codename": "delete_hlasovani", - "ct_app_label": "prednasky", - "ct_model": "hlasovani" - }, - { - "codename": "view_hlasovani", - "ct_app_label": "prednasky", - "ct_model": "hlasovani" - }, - { - "codename": "add_prednaska", - "ct_app_label": "prednasky", - "ct_model": "prednaska" - }, - { - "codename": "change_prednaska", - "ct_app_label": "prednasky", - "ct_model": "prednaska" - }, - { - "codename": "delete_prednaska", - "ct_app_label": "prednasky", - "ct_model": "prednaska" - }, - { - "codename": "view_prednaska", - "ct_app_label": "prednasky", - "ct_model": "prednaska" - }, - { - "codename": "add_seznam", - "ct_app_label": "prednasky", - "ct_model": "seznam" - }, - { - "codename": "change_seznam", - "ct_app_label": "prednasky", - "ct_model": "seznam" - }, - { - "codename": "delete_seznam", - "ct_app_label": "prednasky", - "ct_model": "seznam" - }, - { - "codename": "view_seznam", - "ct_app_label": "prednasky", - "ct_model": "seznam" - }, - { - "codename": "add_cislo", - "ct_app_label": "tvorba", - "ct_model": "cislo" - }, - { - "codename": "change_cislo", - "ct_app_label": "tvorba", - "ct_model": "cislo" - }, - { - "codename": "delete_cislo", - "ct_app_label": "tvorba", - "ct_model": "cislo" - }, - { - "codename": "view_cislo", - "ct_app_label": "tvorba", - "ct_model": "cislo" - }, - { - "codename": "add_clanek", - "ct_app_label": "tvorba", - "ct_model": "clanek" - }, - { - "codename": "change_clanek", - "ct_app_label": "tvorba", - "ct_model": "clanek" - }, - { - "codename": "delete_clanek", - "ct_app_label": "tvorba", - "ct_model": "clanek" - }, - { - "codename": "view_clanek", - "ct_app_label": "tvorba", - "ct_model": "clanek" - }, - { - "codename": "add_deadline", - "ct_app_label": "tvorba", - "ct_model": "deadline" - }, - { - "codename": "change_deadline", - "ct_app_label": "tvorba", - "ct_model": "deadline" - }, - { - "codename": "view_deadline", - "ct_app_label": "tvorba", - "ct_model": "deadline" - }, - { - "codename": "add_konfera", - "ct_app_label": "soustredeni", - "ct_model": "konfera" - }, - { - "codename": "change_konfera", - "ct_app_label": "soustredeni", - "ct_model": "konfera" - }, - { - "codename": "delete_konfera", - "ct_app_label": "soustredeni", - "ct_model": "konfera" - }, - { - "codename": "view_konfera", - "ct_app_label": "soustredeni", - "ct_model": "konfera" - }, - { - "codename": "add_konfery_ucastnici", - "ct_app_label": "soustredeni", - "ct_model": "konfery_ucastnici" - }, - { - "codename": "change_konfery_ucastnici", - "ct_app_label": "soustredeni", - "ct_model": "konfery_ucastnici" - }, - { - "codename": "delete_konfery_ucastnici", - "ct_app_label": "soustredeni", - "ct_model": "konfery_ucastnici" - }, - { - "codename": "view_konfery_ucastnici", - "ct_app_label": "soustredeni", - "ct_model": "konfery_ucastnici" - }, - { - "codename": "add_nastaveni", - "ct_app_label": "various", - "ct_model": "nastaveni" - }, - { - "codename": "change_nastaveni", - "ct_app_label": "various", - "ct_model": "nastaveni" - }, - { - "codename": "delete_nastaveni", - "ct_app_label": "various", - "ct_model": "nastaveni" - }, - { - "codename": "view_nastaveni", - "ct_app_label": "various", - "ct_model": "nastaveni" - }, - { - "codename": "add_novinky", - "ct_app_label": "novinky", - "ct_model": "novinky" - }, - { - "codename": "change_novinky", - "ct_app_label": "novinky", - "ct_model": "novinky" - }, - { - "codename": "delete_novinky", - "ct_app_label": "novinky", - "ct_model": "novinky" - }, - { - "codename": "view_novinky", - "ct_app_label": "novinky", - "ct_model": "novinky" - }, - { - "codename": "change_organizator", - "ct_app_label": "personalni", - "ct_model": "organizator" - }, - { - "codename": "view_organizator", - "ct_app_label": "personalni", - "ct_model": "organizator" - }, - { - "codename": "change_osoba", - "ct_app_label": "personalni", - "ct_model": "osoba" - }, - { - "codename": "view_osoba", - "ct_app_label": "personalni", - "ct_model": "osoba" - }, - { - "codename": "add_pohadka", - "ct_app_label": "tvorba", - "ct_model": "pohadka" - }, - { - "codename": "change_pohadka", - "ct_app_label": "tvorba", - "ct_model": "pohadka" - }, - { - "codename": "delete_pohadka", - "ct_app_label": "tvorba", - "ct_model": "pohadka" - }, - { - "codename": "view_pohadka", - "ct_app_label": "tvorba", - "ct_model": "pohadka" - }, - { - "codename": "add_prijemce", - "ct_app_label": "personalni", - "ct_model": "prijemce" - }, - { - "codename": "change_prijemce", - "ct_app_label": "personalni", - "ct_model": "prijemce" - }, - { - "codename": "delete_prijemce", - "ct_app_label": "personalni", - "ct_model": "prijemce" - }, - { - "codename": "view_prijemce", - "ct_app_label": "personalni", - "ct_model": "prijemce" - }, - { - "codename": "add_problem", - "ct_app_label": "tvorba", - "ct_model": "problem" - }, - { - "codename": "change_problem", - "ct_app_label": "tvorba", - "ct_model": "problem" - }, - { - "codename": "delete_problem", - "ct_app_label": "tvorba", - "ct_model": "problem" - }, - { - "codename": "view_problem", - "ct_app_label": "tvorba", - "ct_model": "problem" - }, - { - "codename": "change_resitel", - "ct_app_label": "personalni", - "ct_model": "resitel" - }, - { - "codename": "view_resitel", - "ct_app_label": "personalni", - "ct_model": "resitel" - }, - { - "codename": "add_rocnik", - "ct_app_label": "tvorba", - "ct_model": "rocnik" - }, - { - "codename": "change_rocnik", - "ct_app_label": "tvorba", - "ct_model": "rocnik" - }, - { - "codename": "delete_rocnik", - "ct_app_label": "tvorba", - "ct_model": "rocnik" - }, - { - "codename": "view_rocnik", - "ct_app_label": "tvorba", - "ct_model": "rocnik" - }, - { - "codename": "add_skola", - "ct_app_label": "personalni", - "ct_model": "skola" - }, - { - "codename": "change_skola", - "ct_app_label": "personalni", - "ct_model": "skola" - }, - { - "codename": "delete_skola", - "ct_app_label": "personalni", - "ct_model": "skola" - }, - { - "codename": "view_skola", - "ct_app_label": "personalni", - "ct_model": "skola" - }, - { - "codename": "add_soustredeni", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni" - }, - { - "codename": "change_soustredeni", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni" - }, - { - "codename": "delete_soustredeni", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni" - }, - { - "codename": "view_soustredeni", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni" - }, - { - "codename": "add_soustredeni_organizatori", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni_organizatori" - }, - { - "codename": "change_soustredeni_organizatori", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni_organizatori" - }, - { - "codename": "delete_soustredeni_organizatori", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni_organizatori" - }, - { - "codename": "view_soustredeni_organizatori", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni_organizatori" - }, - { - "codename": "add_soustredeni_ucastnici", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni_ucastnici" - }, - { - "codename": "change_soustredeni_ucastnici", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni_ucastnici" - }, - { - "codename": "delete_soustredeni_ucastnici", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni_ucastnici" - }, - { - "codename": "view_soustredeni_ucastnici", - "ct_app_label": "soustredeni", - "ct_model": "soustredeni_ucastnici" - }, - { - "codename": "add_tema", - "ct_app_label": "tvorba", - "ct_model": "tema" - }, - { - "codename": "change_tema", - "ct_app_label": "tvorba", - "ct_model": "tema" - }, - { - "codename": "delete_tema", - "ct_app_label": "tvorba", - "ct_model": "tema" - }, - { - "codename": "view_tema", - "ct_app_label": "tvorba", - "ct_model": "tema" - }, - { - "codename": "add_uloha", - "ct_app_label": "tvorba", - "ct_model": "uloha" - }, - { - "codename": "change_uloha", - "ct_app_label": "tvorba", - "ct_model": "uloha" - }, - { - "codename": "delete_uloha", - "ct_app_label": "tvorba", - "ct_model": "uloha" - }, - { - "codename": "view_uloha", - "ct_app_label": "tvorba", - "ct_model": "uloha" - }, - { - "codename": "add_tag", - "ct_app_label": "taggit", - "ct_model": "tag" - }, - { - "codename": "change_tag", - "ct_app_label": "taggit", - "ct_model": "tag" - }, - { - "codename": "delete_tag", - "ct_app_label": "taggit", - "ct_model": "tag" - }, - { - "codename": "view_tag", - "ct_app_label": "taggit", - "ct_model": "tag" - }, - { - "codename": "add_taggeditem", - "ct_app_label": "taggit", - "ct_model": "taggeditem" - }, - { - "codename": "change_taggeditem", - "ct_app_label": "taggit", - "ct_model": "taggeditem" - }, - { - "codename": "delete_taggeditem", - "ct_app_label": "taggit", - "ct_model": "taggeditem" - }, - { - "codename": "view_taggeditem", - "ct_app_label": "taggit", - "ct_model": "taggeditem" - } -] diff --git a/deploy_v2/full_redeploy.sh b/deploy_v2/full_redeploy.sh index cec9c15c..f050bb63 100644 --- a/deploy_v2/full_redeploy.sh +++ b/deploy_v2/full_redeploy.sh @@ -13,7 +13,6 @@ make install_venv make install deploy_v2/pre_migration.py make deploy_test -./manage.py load_org_permissions admin_org_prava.json ./manage.py loaddata data/* systemctl --user start mamweb-test.service ./manage.py generate_thumbnails diff --git a/make/init_local b/make/init_local index 76448a3c..90474f44 100755 --- a/make/init_local +++ b/make/init_local @@ -8,4 +8,3 @@ ensure_venv ./manage.py testdata ./manage.py loaddata data/* #make/sync_prod_flatpages -./manage.py load_org_permissions deploy_v2/admin_org_prava.json diff --git a/various/management/commands/load_org_permissions.py b/various/management/commands/load_org_permissions.py deleted file mode 100644 index 6b4f9e0a..00000000 --- a/various/management/commands/load_org_permissions.py +++ /dev/null @@ -1,30 +0,0 @@ -from django.core.management.base import BaseCommand -from django.contrib.sessions.models import Session -from django.contrib.auth.models import Group, Permission -from django.contrib.contenttypes.models import ContentType -from django.core.exceptions import ObjectDoesNotExist -import json -import argparse - -class Command(BaseCommand): - """ - - """ - def add_arguments(self, parser): - parser.add_argument('file', nargs=1, type=argparse.FileType('r', encoding='utf8')) - - - def handle(self, *args, **options): - try: - orgroup = Group.objects.get(name='org') - except ObjectDoesNotExist: - orgroup = Group(name='org') - orgroup.save() - permissions = json.load(options['file'][0]) - orgroup.permissions.clear() - for jp in permissions: - ct = ContentType.objects.get(app_label = jp['ct_app_label'], model = jp['ct_model']) - perm = Permission.objects.get(content_type = ct, codename = jp['codename']) - orgroup.permissions.add(perm) - orgroup.save() - From e87b84b0281797df21da39207cd47d54aea0b787 Mon Sep 17 00:00:00 2001 From: MaM Web user Date: Tue, 3 Dec 2024 20:59:03 +0100 Subject: [PATCH 06/11] =?UTF-8?q?Fix=20r=C3=A1me=C4=8Dku=20u=20soust=C5=99?= =?UTF-8?q?ed=C4=9Bn=C3=AD,=20kde=20jsem=20nebyl=20=C3=BA=C4=8Dastn=C3=ADk?= =?UTF-8?q?=20(Jid=C3=A1=C5=A1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- soustredeni/templates/soustredeni/seznam_soustredeni.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soustredeni/templates/soustredeni/seznam_soustredeni.html b/soustredeni/templates/soustredeni/seznam_soustredeni.html index c35ebd88..75db6f37 100644 --- a/soustredeni/templates/soustredeni/seznam_soustredeni.html +++ b/soustredeni/templates/soustredeni/seznam_soustredeni.html @@ -37,14 +37,14 @@ {% endif %} {% if soustredeni.kontaktnicek_pdf or soustredeni.kontaktnicek_vcf %} -
    {% for i in soustredeni.ucastnici.all %} {% if i.osoba.user == user %} +
    {% if soustredeni.kontaktnicek_pdf %}
  • kontaktnicek pdf
  • {% endif %} {% if soustredeni.kontaktnicek_vcf %}
  • kontaktnicek vcf
  • {% endif %} +
    {% endif %} {% endfor %} -
    {% endif %} From 497bb054eeeca49d8782f43f7614fa8c8a3a8129 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Tue, 3 Dec 2024 21:27:40 +0100 Subject: [PATCH 07/11] =?UTF-8?q?Vnit=C5=99n=C3=AD=20r=C3=A1me=C4=8Dky=20b?= =?UTF-8?q?y=20m=C4=9Bly=20j=C3=ADt=20vid=C4=9Bt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vnořený rámeček totiž značí, co dalšího ostatní neuvidí po zveřejnění vnějšího rámečku. --- mamweb/static/css/modules.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mamweb/static/css/modules.css b/mamweb/static/css/modules.css index 56cda331..02a9b2bf 100644 --- a/mamweb/static/css/modules.css +++ b/mamweb/static/css/modules.css @@ -17,7 +17,9 @@ border: var(--orgovska-fialova) 2px dashed; & .mam-org-only { - border: 0; + /* Vnitřní rámečky mají být taky vidět */ + border-width: 1px; + background-color: rgba(0, 0, 0, 0.06); } & li { @@ -33,7 +35,9 @@ border: var(--resitelska-fialova) 2px dashed; & .mam-resitel-only { - border: 0; + /* Vnitřní rámečky mají být taky vidět */ + border-width: 1px; + background-color: rgba(0, 0, 0, 0.06); } & li { From edde41e1ab0c96d385751014d0e2251ce3b50b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 3 Dec 2024 22:19:10 +0100 Subject: [PATCH 08/11] =?UTF-8?q?Chyb=C4=9Bj=C3=ADc=C3=AD=20data/groups.js?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/groups.json | 639 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 639 insertions(+) create mode 100644 data/groups.json diff --git a/data/groups.json b/data/groups.json new file mode 100644 index 00000000..de4a5c5d --- /dev/null +++ b/data/groups.json @@ -0,0 +1,639 @@ +[ + { + "fields": { + "name": "org", + "permissions": [ + [ + "org", + "auth", + "user" + ], + [ + "add_flatpage", + "flatpages", + "flatpage" + ], + [ + "change_flatpage", + "flatpages", + "flatpage" + ], + [ + "delete_flatpage", + "flatpages", + "flatpage" + ], + [ + "view_flatpage", + "flatpages", + "flatpage" + ], + [ + "add_galerie", + "galerie", + "galerie" + ], + [ + "change_galerie", + "galerie", + "galerie" + ], + [ + "delete_galerie", + "galerie", + "galerie" + ], + [ + "view_galerie", + "galerie", + "galerie" + ], + [ + "add_obrazek", + "galerie", + "obrazek" + ], + [ + "change_obrazek", + "galerie", + "obrazek" + ], + [ + "delete_obrazek", + "galerie", + "obrazek" + ], + [ + "view_obrazek", + "galerie", + "obrazek" + ], + [ + "add_fotkaheader", + "header_fotky", + "fotkaheader" + ], + [ + "change_fotkaheader", + "header_fotky", + "fotkaheader" + ], + [ + "view_fotkaheader", + "header_fotky", + "fotkaheader" + ], + [ + "add_fotkaurlvazba", + "header_fotky", + "fotkaurlvazba" + ], + [ + "change_fotkaurlvazba", + "header_fotky", + "fotkaurlvazba" + ], + [ + "view_fotkaurlvazba", + "header_fotky", + "fotkaurlvazba" + ], + [ + "add_komentar", + "korektury", + "komentar" + ], + [ + "change_komentar", + "korektury", + "komentar" + ], + [ + "delete_komentar", + "korektury", + "komentar" + ], + [ + "view_komentar", + "korektury", + "komentar" + ], + [ + "add_korekturovanepdf", + "korektury", + "korekturovanepdf" + ], + [ + "change_korekturovanepdf", + "korektury", + "korekturovanepdf" + ], + [ + "delete_korekturovanepdf", + "korektury", + "korekturovanepdf" + ], + [ + "view_korekturovanepdf", + "korektury", + "korekturovanepdf" + ], + [ + "add_oprava", + "korektury", + "oprava" + ], + [ + "change_oprava", + "korektury", + "oprava" + ], + [ + "delete_oprava", + "korektury", + "oprava" + ], + [ + "view_oprava", + "korektury", + "oprava" + ], + [ + "add_novinky", + "novinky", + "novinky" + ], + [ + "change_novinky", + "novinky", + "novinky" + ], + [ + "delete_novinky", + "novinky", + "novinky" + ], + [ + "view_novinky", + "novinky", + "novinky" + ], + [ + "change_organizator", + "personalni", + "organizator" + ], + [ + "view_organizator", + "personalni", + "organizator" + ], + [ + "change_osoba", + "personalni", + "osoba" + ], + [ + "view_osoba", + "personalni", + "osoba" + ], + [ + "add_prijemce", + "personalni", + "prijemce" + ], + [ + "change_prijemce", + "personalni", + "prijemce" + ], + [ + "delete_prijemce", + "personalni", + "prijemce" + ], + [ + "view_prijemce", + "personalni", + "prijemce" + ], + [ + "change_resitel", + "personalni", + "resitel" + ], + [ + "view_resitel", + "personalni", + "resitel" + ], + [ + "add_skola", + "personalni", + "skola" + ], + [ + "change_skola", + "personalni", + "skola" + ], + [ + "delete_skola", + "personalni", + "skola" + ], + [ + "view_skola", + "personalni", + "skola" + ], + [ + "add_hlasovani", + "prednasky", + "hlasovani" + ], + [ + "change_hlasovani", + "prednasky", + "hlasovani" + ], + [ + "delete_hlasovani", + "prednasky", + "hlasovani" + ], + [ + "view_hlasovani", + "prednasky", + "hlasovani" + ], + [ + "add_prednaska", + "prednasky", + "prednaska" + ], + [ + "change_prednaska", + "prednasky", + "prednaska" + ], + [ + "delete_prednaska", + "prednasky", + "prednaska" + ], + [ + "view_prednaska", + "prednasky", + "prednaska" + ], + [ + "add_seznam", + "prednasky", + "seznam" + ], + [ + "change_seznam", + "prednasky", + "seznam" + ], + [ + "delete_seznam", + "prednasky", + "seznam" + ], + [ + "view_seznam", + "prednasky", + "seznam" + ], + [ + "add_konfera", + "soustredeni", + "konfera" + ], + [ + "change_konfera", + "soustredeni", + "konfera" + ], + [ + "delete_konfera", + "soustredeni", + "konfera" + ], + [ + "view_konfera", + "soustredeni", + "konfera" + ], + [ + "add_konfery_ucastnici", + "soustredeni", + "konfery_ucastnici" + ], + [ + "change_konfery_ucastnici", + "soustredeni", + "konfery_ucastnici" + ], + [ + "delete_konfery_ucastnici", + "soustredeni", + "konfery_ucastnici" + ], + [ + "view_konfery_ucastnici", + "soustredeni", + "konfery_ucastnici" + ], + [ + "add_soustredeni", + "soustredeni", + "soustredeni" + ], + [ + "change_soustredeni", + "soustredeni", + "soustredeni" + ], + [ + "delete_soustredeni", + "soustredeni", + "soustredeni" + ], + [ + "view_soustredeni", + "soustredeni", + "soustredeni" + ], + [ + "add_soustredeni_organizatori", + "soustredeni", + "soustredeni_organizatori" + ], + [ + "change_soustredeni_organizatori", + "soustredeni", + "soustredeni_organizatori" + ], + [ + "delete_soustredeni_organizatori", + "soustredeni", + "soustredeni_organizatori" + ], + [ + "view_soustredeni_organizatori", + "soustredeni", + "soustredeni_organizatori" + ], + [ + "add_soustredeni_ucastnici", + "soustredeni", + "soustredeni_ucastnici" + ], + [ + "change_soustredeni_ucastnici", + "soustredeni", + "soustredeni_ucastnici" + ], + [ + "delete_soustredeni_ucastnici", + "soustredeni", + "soustredeni_ucastnici" + ], + [ + "view_soustredeni_ucastnici", + "soustredeni", + "soustredeni_ucastnici" + ], + [ + "add_tag", + "taggit", + "tag" + ], + [ + "change_tag", + "taggit", + "tag" + ], + [ + "delete_tag", + "taggit", + "tag" + ], + [ + "view_tag", + "taggit", + "tag" + ], + [ + "add_taggeditem", + "taggit", + "taggeditem" + ], + [ + "change_taggeditem", + "taggit", + "taggeditem" + ], + [ + "delete_taggeditem", + "taggit", + "taggeditem" + ], + [ + "view_taggeditem", + "taggit", + "taggeditem" + ], + [ + "add_cislo", + "tvorba", + "cislo" + ], + [ + "change_cislo", + "tvorba", + "cislo" + ], + [ + "delete_cislo", + "tvorba", + "cislo" + ], + [ + "view_cislo", + "tvorba", + "cislo" + ], + [ + "add_clanek", + "tvorba", + "clanek" + ], + [ + "change_clanek", + "tvorba", + "clanek" + ], + [ + "delete_clanek", + "tvorba", + "clanek" + ], + [ + "view_clanek", + "tvorba", + "clanek" + ], + [ + "add_deadline", + "tvorba", + "deadline" + ], + [ + "change_deadline", + "tvorba", + "deadline" + ], + [ + "view_deadline", + "tvorba", + "deadline" + ], + [ + "add_pohadka", + "tvorba", + "pohadka" + ], + [ + "change_pohadka", + "tvorba", + "pohadka" + ], + [ + "delete_pohadka", + "tvorba", + "pohadka" + ], + [ + "view_pohadka", + "tvorba", + "pohadka" + ], + [ + "add_problem", + "tvorba", + "problem" + ], + [ + "change_problem", + "tvorba", + "problem" + ], + [ + "delete_problem", + "tvorba", + "problem" + ], + [ + "view_problem", + "tvorba", + "problem" + ], + [ + "add_rocnik", + "tvorba", + "rocnik" + ], + [ + "change_rocnik", + "tvorba", + "rocnik" + ], + [ + "delete_rocnik", + "tvorba", + "rocnik" + ], + [ + "view_rocnik", + "tvorba", + "rocnik" + ], + [ + "add_tema", + "tvorba", + "tema" + ], + [ + "change_tema", + "tvorba", + "tema" + ], + [ + "delete_tema", + "tvorba", + "tema" + ], + [ + "view_tema", + "tvorba", + "tema" + ], + [ + "add_uloha", + "tvorba", + "uloha" + ], + [ + "change_uloha", + "tvorba", + "uloha" + ], + [ + "delete_uloha", + "tvorba", + "uloha" + ], + [ + "view_uloha", + "tvorba", + "uloha" + ], + [ + "add_nastaveni", + "various", + "nastaveni" + ], + [ + "change_nastaveni", + "various", + "nastaveni" + ], + [ + "delete_nastaveni", + "various", + "nastaveni" + ], + [ + "view_nastaveni", + "various", + "nastaveni" + ] + ] + }, + "model": "auth.group", + "pk": 1 + }, + { + "fields": { + "name": "resitel", + "permissions": [] + }, + "model": "auth.group", + "pk": 2 + } +] \ No newline at end of file From 42d57e7b424729798760298e57f6ceb51035d54e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 3 Dec 2024 22:19:40 +0100 Subject: [PATCH 09/11] =?UTF-8?q?P=C5=99eb=C3=BDvaj=C3=ADc=C3=AD=20dump=20?= =?UTF-8?q?pr=C3=A1v?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commands/save_org_permissions.py | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 various/management/commands/save_org_permissions.py diff --git a/various/management/commands/save_org_permissions.py b/various/management/commands/save_org_permissions.py deleted file mode 100644 index 216f9e4b..00000000 --- a/various/management/commands/save_org_permissions.py +++ /dev/null @@ -1,20 +0,0 @@ -from django.core.management.base import BaseCommand -from django.contrib.sessions.models import Session -from django.contrib.auth.models import Group, Permission -import json - -class Command(BaseCommand): - """ - Dump permissions for group 'org' such that them can be used on an other machine. - - """ - def handle(self, *args, **options): - orgroup = Group.objects.get(name='org') - permissions = [] - for p in orgroup.permissions.all(): - permissions.append({ - 'codename': p.codename, - 'ct_app_label': p.content_type.app_label, - 'ct_model': p.content_type.model}) - print(json.dumps(permissions)) - From 51eeffd0c55eb3afa7e0adad903ff93103de2075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 3 Dec 2024 22:23:53 +0100 Subject: [PATCH 10/11] =?UTF-8?q?Je=C5=A1t=C4=9B=20pr=C3=A1vo=20=C5=99e?= =?UTF-8?q?=C5=A1itele=20a=20trochu=20jin=C3=A9=20=C5=99azen=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/groups.json | 116 +++++++++++++++++++++++++---------------------- 1 file changed, 61 insertions(+), 55 deletions(-) diff --git a/data/groups.json b/data/groups.json index de4a5c5d..df9516a0 100644 --- a/data/groups.json +++ b/data/groups.json @@ -14,12 +14,12 @@ "flatpage" ], [ - "change_flatpage", + "delete_flatpage", "flatpages", "flatpage" ], [ - "delete_flatpage", + "change_flatpage", "flatpages", "flatpage" ], @@ -34,12 +34,12 @@ "galerie" ], [ - "change_galerie", + "delete_galerie", "galerie", "galerie" ], [ - "delete_galerie", + "change_galerie", "galerie", "galerie" ], @@ -54,12 +54,12 @@ "obrazek" ], [ - "change_obrazek", + "delete_obrazek", "galerie", "obrazek" ], [ - "delete_obrazek", + "change_obrazek", "galerie", "obrazek" ], @@ -104,12 +104,12 @@ "komentar" ], [ - "change_komentar", + "delete_komentar", "korektury", "komentar" ], [ - "delete_komentar", + "change_komentar", "korektury", "komentar" ], @@ -124,12 +124,12 @@ "korekturovanepdf" ], [ - "change_korekturovanepdf", + "delete_korekturovanepdf", "korektury", "korekturovanepdf" ], [ - "delete_korekturovanepdf", + "change_korekturovanepdf", "korektury", "korekturovanepdf" ], @@ -144,12 +144,12 @@ "oprava" ], [ - "change_oprava", + "delete_oprava", "korektury", "oprava" ], [ - "delete_oprava", + "change_oprava", "korektury", "oprava" ], @@ -164,12 +164,12 @@ "novinky" ], [ - "change_novinky", + "delete_novinky", "novinky", "novinky" ], [ - "delete_novinky", + "change_novinky", "novinky", "novinky" ], @@ -204,12 +204,12 @@ "prijemce" ], [ - "change_prijemce", + "delete_prijemce", "personalni", "prijemce" ], [ - "delete_prijemce", + "change_prijemce", "personalni", "prijemce" ], @@ -234,12 +234,12 @@ "skola" ], [ - "change_skola", + "delete_skola", "personalni", "skola" ], [ - "delete_skola", + "change_skola", "personalni", "skola" ], @@ -254,12 +254,12 @@ "hlasovani" ], [ - "change_hlasovani", + "delete_hlasovani", "prednasky", "hlasovani" ], [ - "delete_hlasovani", + "change_hlasovani", "prednasky", "hlasovani" ], @@ -274,12 +274,12 @@ "prednaska" ], [ - "change_prednaska", + "delete_prednaska", "prednasky", "prednaska" ], [ - "delete_prednaska", + "change_prednaska", "prednasky", "prednaska" ], @@ -294,12 +294,12 @@ "seznam" ], [ - "change_seznam", + "delete_seznam", "prednasky", "seznam" ], [ - "delete_seznam", + "change_seznam", "prednasky", "seznam" ], @@ -314,12 +314,12 @@ "konfera" ], [ - "change_konfera", + "delete_konfera", "soustredeni", "konfera" ], [ - "delete_konfera", + "change_konfera", "soustredeni", "konfera" ], @@ -334,12 +334,12 @@ "konfery_ucastnici" ], [ - "change_konfery_ucastnici", + "delete_konfery_ucastnici", "soustredeni", "konfery_ucastnici" ], [ - "delete_konfery_ucastnici", + "change_konfery_ucastnici", "soustredeni", "konfery_ucastnici" ], @@ -354,12 +354,12 @@ "soustredeni" ], [ - "change_soustredeni", + "delete_soustredeni", "soustredeni", "soustredeni" ], [ - "delete_soustredeni", + "change_soustredeni", "soustredeni", "soustredeni" ], @@ -374,12 +374,12 @@ "soustredeni_organizatori" ], [ - "change_soustredeni_organizatori", + "delete_soustredeni_organizatori", "soustredeni", "soustredeni_organizatori" ], [ - "delete_soustredeni_organizatori", + "change_soustredeni_organizatori", "soustredeni", "soustredeni_organizatori" ], @@ -394,12 +394,12 @@ "soustredeni_ucastnici" ], [ - "change_soustredeni_ucastnici", + "delete_soustredeni_ucastnici", "soustredeni", "soustredeni_ucastnici" ], [ - "delete_soustredeni_ucastnici", + "change_soustredeni_ucastnici", "soustredeni", "soustredeni_ucastnici" ], @@ -414,12 +414,12 @@ "tag" ], [ - "change_tag", + "delete_tag", "taggit", "tag" ], [ - "delete_tag", + "change_tag", "taggit", "tag" ], @@ -434,12 +434,12 @@ "taggeditem" ], [ - "change_taggeditem", + "delete_taggeditem", "taggit", "taggeditem" ], [ - "delete_taggeditem", + "change_taggeditem", "taggit", "taggeditem" ], @@ -454,12 +454,12 @@ "cislo" ], [ - "change_cislo", + "delete_cislo", "tvorba", "cislo" ], [ - "delete_cislo", + "change_cislo", "tvorba", "cislo" ], @@ -474,12 +474,12 @@ "clanek" ], [ - "change_clanek", + "delete_clanek", "tvorba", "clanek" ], [ - "delete_clanek", + "change_clanek", "tvorba", "clanek" ], @@ -509,12 +509,12 @@ "pohadka" ], [ - "change_pohadka", + "delete_pohadka", "tvorba", "pohadka" ], [ - "delete_pohadka", + "change_pohadka", "tvorba", "pohadka" ], @@ -529,12 +529,12 @@ "problem" ], [ - "change_problem", + "delete_problem", "tvorba", "problem" ], [ - "delete_problem", + "change_problem", "tvorba", "problem" ], @@ -549,12 +549,12 @@ "rocnik" ], [ - "change_rocnik", + "delete_rocnik", "tvorba", "rocnik" ], [ - "delete_rocnik", + "change_rocnik", "tvorba", "rocnik" ], @@ -569,12 +569,12 @@ "tema" ], [ - "change_tema", + "delete_tema", "tvorba", "tema" ], [ - "delete_tema", + "change_tema", "tvorba", "tema" ], @@ -589,12 +589,12 @@ "uloha" ], [ - "change_uloha", + "delete_uloha", "tvorba", "uloha" ], [ - "delete_uloha", + "change_uloha", "tvorba", "uloha" ], @@ -609,12 +609,12 @@ "nastaveni" ], [ - "change_nastaveni", + "delete_nastaveni", "various", "nastaveni" ], [ - "delete_nastaveni", + "change_nastaveni", "various", "nastaveni" ], @@ -631,7 +631,13 @@ { "fields": { "name": "resitel", - "permissions": [] + "permissions": [ + [ + "resitel", + "auth", + "user" + ] + ] }, "model": "auth.group", "pk": 2 From 65ec9bfaed3d815c58d4644c8b4b71d7937242c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 10 Dec 2024 16:33:25 +0100 Subject: [PATCH 11/11] =?UTF-8?q?Fix=20p=C5=99edn=C3=A1=C5=A1ek?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prednasky/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prednasky/views.py b/prednasky/views.py index 368c98d9..f0694dc5 100644 --- a/prednasky/views.py +++ b/prednasky/views.py @@ -67,7 +67,7 @@ class SeznamListView(generic.ListView): def get_queryset(self): self.seznam = get_object_or_404(Seznam, id=self.kwargs["seznam"]) prednasky = Prednaska.objects.filter(seznamy=self.seznam).order_by( - 'org__user__first_name', 'org__user__last_name' + 'org__osoba__user__first_name', 'org__osoba__user__last_name' ) return prednasky