From edf29bfb66ef01029d39dcd6c6fd0465401d98f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 16 Feb 2021 20:09:33 +0100 Subject: [PATCH 01/13] =?UTF-8?q?p=C5=99eklep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/templates/seminar/zadani/AktualniZadani.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/templates/seminar/zadani/AktualniZadani.html b/seminar/templates/seminar/zadani/AktualniZadani.html index e87821ae..e6fc298f 100644 --- a/seminar/templates/seminar/zadani/AktualniZadani.html +++ b/seminar/templates/seminar/zadani/AktualniZadani.html @@ -21,7 +21,7 @@ {% endif %} {% if ac.datum_preddeadline %}
- Termín odeslání {{ac.poradi}}. série pro otištění v dlaším čísle: + Termín odeslání {{ac.poradi}}. série pro otištění v dalším čísle: {{ac.datum_preddeadline}}
{% endif %} From b1539258d95cbdc0221518b526235fff8e8c6345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 16 Feb 2021 20:10:34 +0100 Subject: [PATCH 02/13] =?UTF-8?q?vydan=C3=BD=20=C4=8Dl=C3=A1nek=20je=20vy?= =?UTF-8?q?=C5=99e=C5=A1en=C3=BD,=20ne=20zadan=C3=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/views/views_all.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/views/views_all.py b/seminar/views/views_all.py index 42e982f5..24d31ecc 100644 --- a/seminar/views/views_all.py +++ b/seminar/views/views_all.py @@ -1382,7 +1382,7 @@ class ClankyResitelView(generic.ListView): # FIXME: QuerySet není pole! def get_queryset(self): - clanky = Clanek.objects.filter(stav=Problem.STAV_ZADANY).select_related('cislo__rocnik').order_by('-cislo__rocnik__rocnik') + clanky = Clanek.objects.filter(stav=Problem.STAV_VYRESENY).select_related('cislo__rocnik').order_by('-cislo__rocnik__rocnik') queryset = [] skupiny_clanku = group_by_rocnik(clanky) for skupina in skupiny_clanku: From 98f2ad12a72f32b5d8204cccdef6886baae14628 Mon Sep 17 00:00:00 2001 From: Tomas 'Jethro' Pokorny Date: Tue, 16 Feb 2021 20:22:08 +0100 Subject: [PATCH 03/13] Clanky | pokud je PDF s cislem, odkazat na nej. --- .../seminar/clanky/resitelske_clanky.html | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/seminar/templates/seminar/clanky/resitelske_clanky.html b/seminar/templates/seminar/clanky/resitelske_clanky.html index 94fb27cc..bbda5839 100644 --- a/seminar/templates/seminar/clanky/resitelske_clanky.html +++ b/seminar/templates/seminar/clanky/resitelske_clanky.html @@ -9,15 +9,20 @@ {% for clanek in object_list %} -{% with clanek.cislo.rocnik.rocnik as rocnik %} - {% ifchanged rocnik %} - {% if not forloop.first %}{% endif %} -

{{ rocnik }}. ročník

-
    - {% endifchanged %} -
  • - {{ clanek.nazev }} -{% endwith %} + {% with clanek.cislo.rocnik.rocnik as rocnik %} + {% ifchanged rocnik %} + {% if not forloop.first %}
{% endif %} +

{{ rocnik }}. ročník

+
    + {% endifchanged %} +
  • + {% if clanek.cislo.pdf %} + {{ clanek.nazev }} + {% else %} + {{ clanek.nazev }} (vyšlo v čísle {{clanek.cislo}}) + {% endif %} +
  • + {% endwith %} {% endfor %}
From 52892b456a3409c51401a7a0f26cb029bede882f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 16 Feb 2021 20:49:23 +0100 Subject: [PATCH 04/13] =?UTF-8?q?zkr=C3=A1=C5=A1lov=C3=A1n=C3=AD=20deadlin?= =?UTF-8?q?=C5=AF=20na=20str=C3=A1nce=20zad=C3=A1n=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/static/css/mamweb.css | 26 ++++++++++++++----- .../seminar/zadani/AktualniZadani.html | 25 +++++++++--------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index b8a9b262..cf8f3e64 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -326,11 +326,7 @@ div.novinky_name { font-style: italic; } -div.zadani_azad_termin { - text-align: center; - font-size: large; - font-weight: bold -} + /********** * Footer @@ -912,7 +908,25 @@ div.cislo_odkazy ul { } #azad_obrazek { - margin-top: 15px; + margin-top: 10px; +} + +div.zadani_termin { + text-align: center; + font-size: large; + font-weight: bold; +} + +@media (max-width: 420px) { + div.zadani_termin { + font-size: small; + } + +} + +div.zadani_termin .datum { + color:#e84e10; + margin:0px; } diff --git a/seminar/templates/seminar/zadani/AktualniZadani.html b/seminar/templates/seminar/zadani/AktualniZadani.html index e6fc298f..5bcb6ec1 100644 --- a/seminar/templates/seminar/zadani/AktualniZadani.html +++ b/seminar/templates/seminar/zadani/AktualniZadani.html @@ -12,25 +12,26 @@ {# Zobrazovani neverejnych zadani jen organizatorum #} {% if user.je_org or verejne %} {% if user.je_org and not verejne %}
{% endif %} + +
+ Termíny pro odeslání řešení {{ac.poradi}}. série:
- {% if ac.datum_deadline_soustredeni %} -
- Termín odeslání {{ac.poradi}}. série pro účast na soustředění: - {{ac.datum_deadline_soustredeni}} -
+ {% if ac.datum_deadline_soustredeni %} + {{ac.datum_deadline_soustredeni}} pro účast na soustředění
{% endif %} + {% if ac.datum_preddeadline %} -
- Termín odeslání {{ac.poradi}}. série pro otištění v dalším čísle: - {{ac.datum_preddeadline}} -
+ {{ac.datum_preddeadline}} pro otištění v dalším čísle
{% endif %} + {% if ac.datum_deadline %} -
- Termín odeslání {{ac.poradi}}. série: {{ac.datum_deadline}} -
+ {{ac.datum_deadline}} definitivní deadline
{% endif %} +
+ +
+ {% if ac.titulka_nahled and ac.pdf %} Titulní {% endif %} From 09c1d212574d9c84dce1905f5943b5da7e637d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aneta=20Pokorn=C3=A1?= Date: Tue, 16 Feb 2021 20:53:37 +0100 Subject: [PATCH 05/13] =?UTF-8?q?Dops=C3=A1na=20a=20trochu=20otestov=C3=A1?= =?UTF-8?q?na=20funkce=20get=5Fupper=5Fnode=5Fof=5Ftype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/treelib.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/seminar/treelib.py b/seminar/treelib.py index 9482079a..1835bf1c 100644 --- a/seminar/treelib.py +++ b/seminar/treelib.py @@ -217,6 +217,17 @@ def get_prev_node_of_type(node, type): return current return None +def get_upper_node_of_type(node, type): + # vrací první vyšší node daného typu (ignoruje sourozence) + if node is None: + return + current = node + while get_parent(current) is not None: + current = get_parent(current) + if isinstance(current, type): + return current + return None + # Exception, kterou některé metody při špatném použití mohou házet From 9af618ef28092f862542500a14a750ad08de62e1 Mon Sep 17 00:00:00 2001 From: Tomas 'Jethro' Pokorny Date: Tue, 16 Feb 2021 21:23:33 +0100 Subject: [PATCH 06/13] Clanky | Pridan seznam autoru clanku Predpoklada, ze kazdy clanek ma nejvyse jedno reseni (ktere muze mit vic resitelu). --- .../seminar/clanky/resitelske_clanky.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/seminar/templates/seminar/clanky/resitelske_clanky.html b/seminar/templates/seminar/clanky/resitelske_clanky.html index bbda5839..0b7edc70 100644 --- a/seminar/templates/seminar/clanky/resitelske_clanky.html +++ b/seminar/templates/seminar/clanky/resitelske_clanky.html @@ -17,9 +17,20 @@ {% endifchanged %}
  • {% if clanek.cislo.pdf %} - {{ clanek.nazev }} + + {{ clanek.nazev }} + ({% for r in clanek.reseni_set.first.resitele.all %} + {{r}} + {% if not forloop.last %},{% endif %} + {% endfor %} + + ) {% else %} - {{ clanek.nazev }} (vyšlo v čísle {{clanek.cislo}}) + {{ clanek.nazev }} + ({% for r in clanek.reseni_set.first.resitele.all %} + {{r}}, + {% endfor %} + vyšlo v čísle {{clanek.cislo}}) {% endif %}
  • {% endwith %} From 6ccf9ec9e832ba2e57b1e90707d6790be5f96d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 16 Feb 2021 21:43:41 +0100 Subject: [PATCH 07/13] =?UTF-8?q?odkaz=20na=20=C4=8Dl=C3=A1nky=20z=20archi?= =?UTF-8?q?vu,=20smaz=C3=A1ny=20odkazy=20z=20aktu=C3=A1ln=C3=ADho=20=C4=8D?= =?UTF-8?q?=C3=ADsla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/sitetree_new.json | 74 ++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 49 deletions(-) diff --git a/data/sitetree_new.json b/data/sitetree_new.json index ec6cd36c..3445dd59 100644 --- a/data/sitetree_new.json +++ b/data/sitetree_new.json @@ -343,30 +343,6 @@ "model": "sitetree.treeitem", "pk": 16 }, - { - "fields": { - "access_guest": false, - "access_loggedin": false, - "access_perm_type": 1, - "access_permissions": [], - "access_restricted": false, - "alias": null, - "description": "", - "hidden": false, - "hint": "", - "inbreadcrumbs": true, - "inmenu": true, - "insitetree": true, - "parent": 3, - "sort_order": 34, - "title": "Články", - "tree": 1, - "url": "clanky_resitel", - "urlaspattern": true - }, - "model": "sitetree.treeitem", - "pk": 17 - }, { "fields": { "access_guest": false, @@ -659,30 +635,6 @@ "model": "sitetree.treeitem", "pk": 33 }, - { - "fields": { - "access_guest": false, - "access_loggedin": false, - "access_perm_type": 1, - "access_permissions": [], - "access_restricted": false, - "alias": null, - "description": "", - "hidden": false, - "hint": "", - "inbreadcrumbs": true, - "inmenu": true, - "insitetree": true, - "parent": 3, - "sort_order": 17, - "title": "Témata", - "tree": 1, - "url": "seminar_temata", - "urlaspattern": true - }, - "model": "sitetree.treeitem", - "pk": 34 - }, { "fields": { "access_guest": false, @@ -806,5 +758,29 @@ }, "model": "sitetree.treeitem", "pk": 39 + }, + { + "fields": { + "access_guest": false, + "access_loggedin": false, + "access_perm_type": 1, + "access_permissions": [], + "access_restricted": false, + "alias": null, + "description": "", + "hidden": false, + "hint": "", + "inbreadcrumbs": true, + "inmenu": true, + "insitetree": true, + "parent": 5, + "sort_order": 40, + "title": "Řešitelské články", + "tree": 1, + "url": "/archiv/clanky", + "urlaspattern": false + }, + "model": "sitetree.treeitem", + "pk": 40 } -] +] \ No newline at end of file From e64dc7c7cbf3287ecec1298def0e3fa7c256fcb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Tue, 16 Feb 2021 21:48:57 +0100 Subject: [PATCH 08/13] =?UTF-8?q?p=C5=99ejmenov=C3=A1n=C3=AD=20sitetree.js?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/{sitetree_new.json => sitetree.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename data/{sitetree_new.json => sitetree.json} (100%) diff --git a/data/sitetree_new.json b/data/sitetree.json similarity index 100% rename from data/sitetree_new.json rename to data/sitetree.json From 4be74b8387132aba7edb755272cd135bbbead1ae Mon Sep 17 00:00:00 2001 From: Tomas 'Jethro' Pokorny Date: Tue, 16 Feb 2021 21:51:48 +0100 Subject: [PATCH 09/13] Pridany fixture pro skupinu org. --- data/auth_groups.json | 249 ++++ data/auth_permissions.json | 2441 ++++++++++++++++++++++++++++++++++++ 2 files changed, 2690 insertions(+) create mode 100644 data/auth_groups.json create mode 100644 data/auth_permissions.json diff --git a/data/auth_groups.json b/data/auth_groups.json new file mode 100644 index 00000000..b5f32a5c --- /dev/null +++ b/data/auth_groups.json @@ -0,0 +1,249 @@ +[ + { + "fields": { + "name": "org", + "permissions": [ + 23, + 24, + 25, + 1, + 26, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 51, + 55, + 52, + 53, + 54, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 43, + 44, + 45, + 46, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 244, + 245, + 246, + 247, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 258, + 259, + 212, + 213, + 214, + 215, + 80, + 81, + 82, + 83, + 180, + 181, + 182, + 183, + 172, + 173, + 174, + 175, + 168, + 169, + 170, + 171, + 132, + 133, + 134, + 135, + 224, + 225, + 226, + 227, + 184, + 185, + 186, + 187, + 112, + 113, + 114, + 115, + 120, + 121, + 122, + 123, + 164, + 165, + 166, + 167, + 124, + 125, + 126, + 127, + 216, + 217, + 218, + 219, + 136, + 137, + 138, + 139, + 152, + 153, + 154, + 155, + 208, + 209, + 210, + 211, + 140, + 141, + 142, + 143, + 108, + 109, + 110, + 111, + 84, + 85, + 86, + 87, + 104, + 105, + 106, + 107, + 160, + 161, + 162, + 163, + 220, + 221, + 222, + 223, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 188, + 189, + 190, + 191, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 128, + 129, + 130, + 131, + 116, + 117, + 118, + 119, + 156, + 157, + 158, + 159, + 192, + 193, + 194, + 195, + 144, + 145, + 146, + 147, + 196, + 197, + 198, + 199, + 176, + 177, + 178, + 179, + 148, + 149, + 150, + 151, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 47, + 48, + 49, + 50 + ] + }, + "model": "auth.group", + "pk": 1 + } +] \ No newline at end of file diff --git a/data/auth_permissions.json b/data/auth_permissions.json new file mode 100644 index 00000000..c58d5a90 --- /dev/null +++ b/data/auth_permissions.json @@ -0,0 +1,2441 @@ +[ + { + "fields": { + "codename": "org", + "content_type": 17, + "name": "org" + }, + "model": "auth.permission", + "pk": 1 + }, + { + "fields": { + "codename": "resitel", + "content_type": 17, + "name": "resitel" + }, + "model": "auth.permission", + "pk": 2 + }, + { + "fields": { + "codename": "add_contenttype", + "content_type": 18, + "name": "Can add content type" + }, + "model": "auth.permission", + "pk": 3 + }, + { + "fields": { + "codename": "change_contenttype", + "content_type": 18, + "name": "Can change content type" + }, + "model": "auth.permission", + "pk": 4 + }, + { + "fields": { + "codename": "delete_contenttype", + "content_type": 18, + "name": "Can delete content type" + }, + "model": "auth.permission", + "pk": 5 + }, + { + "fields": { + "codename": "view_contenttype", + "content_type": 18, + "name": "Can view content type" + }, + "model": "auth.permission", + "pk": 6 + }, + { + "fields": { + "codename": "add_session", + "content_type": 19, + "name": "Can add session" + }, + "model": "auth.permission", + "pk": 7 + }, + { + "fields": { + "codename": "change_session", + "content_type": 19, + "name": "Can change session" + }, + "model": "auth.permission", + "pk": 8 + }, + { + "fields": { + "codename": "delete_session", + "content_type": 19, + "name": "Can delete session" + }, + "model": "auth.permission", + "pk": 9 + }, + { + "fields": { + "codename": "view_session", + "content_type": 19, + "name": "Can view session" + }, + "model": "auth.permission", + "pk": 10 + }, + { + "fields": { + "codename": "add_site", + "content_type": 20, + "name": "Can add site" + }, + "model": "auth.permission", + "pk": 11 + }, + { + "fields": { + "codename": "change_site", + "content_type": 20, + "name": "Can change site" + }, + "model": "auth.permission", + "pk": 12 + }, + { + "fields": { + "codename": "delete_site", + "content_type": 20, + "name": "Can delete site" + }, + "model": "auth.permission", + "pk": 13 + }, + { + "fields": { + "codename": "view_site", + "content_type": 20, + "name": "Can view site" + }, + "model": "auth.permission", + "pk": 14 + }, + { + "fields": { + "codename": "add_permission", + "content_type": 21, + "name": "Can add permission" + }, + "model": "auth.permission", + "pk": 15 + }, + { + "fields": { + "codename": "change_permission", + "content_type": 21, + "name": "Can change permission" + }, + "model": "auth.permission", + "pk": 16 + }, + { + "fields": { + "codename": "delete_permission", + "content_type": 21, + "name": "Can delete permission" + }, + "model": "auth.permission", + "pk": 17 + }, + { + "fields": { + "codename": "view_permission", + "content_type": 21, + "name": "Can view permission" + }, + "model": "auth.permission", + "pk": 18 + }, + { + "fields": { + "codename": "add_group", + "content_type": 22, + "name": "Can add group" + }, + "model": "auth.permission", + "pk": 19 + }, + { + "fields": { + "codename": "change_group", + "content_type": 22, + "name": "Can change group" + }, + "model": "auth.permission", + "pk": 20 + }, + { + "fields": { + "codename": "delete_group", + "content_type": 22, + "name": "Can delete group" + }, + "model": "auth.permission", + "pk": 21 + }, + { + "fields": { + "codename": "view_group", + "content_type": 22, + "name": "Can view group" + }, + "model": "auth.permission", + "pk": 22 + }, + { + "fields": { + "codename": "add_user", + "content_type": 17, + "name": "Can add user" + }, + "model": "auth.permission", + "pk": 23 + }, + { + "fields": { + "codename": "change_user", + "content_type": 17, + "name": "Can change user" + }, + "model": "auth.permission", + "pk": 24 + }, + { + "fields": { + "codename": "delete_user", + "content_type": 17, + "name": "Can delete user" + }, + "model": "auth.permission", + "pk": 25 + }, + { + "fields": { + "codename": "view_user", + "content_type": 17, + "name": "Can view user" + }, + "model": "auth.permission", + "pk": 26 + }, + { + "fields": { + "codename": "add_revision", + "content_type": 23, + "name": "Can add revision" + }, + "model": "auth.permission", + "pk": 27 + }, + { + "fields": { + "codename": "change_revision", + "content_type": 23, + "name": "Can change revision" + }, + "model": "auth.permission", + "pk": 28 + }, + { + "fields": { + "codename": "delete_revision", + "content_type": 23, + "name": "Can delete revision" + }, + "model": "auth.permission", + "pk": 29 + }, + { + "fields": { + "codename": "view_revision", + "content_type": 23, + "name": "Can view revision" + }, + "model": "auth.permission", + "pk": 30 + }, + { + "fields": { + "codename": "add_version", + "content_type": 24, + "name": "Can add version" + }, + "model": "auth.permission", + "pk": 31 + }, + { + "fields": { + "codename": "change_version", + "content_type": 24, + "name": "Can change version" + }, + "model": "auth.permission", + "pk": 32 + }, + { + "fields": { + "codename": "delete_version", + "content_type": 24, + "name": "Can delete version" + }, + "model": "auth.permission", + "pk": 33 + }, + { + "fields": { + "codename": "view_version", + "content_type": 24, + "name": "Can view version" + }, + "model": "auth.permission", + "pk": 34 + }, + { + "fields": { + "codename": "add_tag", + "content_type": 25, + "name": "Can add tag" + }, + "model": "auth.permission", + "pk": 35 + }, + { + "fields": { + "codename": "change_tag", + "content_type": 25, + "name": "Can change tag" + }, + "model": "auth.permission", + "pk": 36 + }, + { + "fields": { + "codename": "delete_tag", + "content_type": 25, + "name": "Can delete tag" + }, + "model": "auth.permission", + "pk": 37 + }, + { + "fields": { + "codename": "view_tag", + "content_type": 25, + "name": "Can view tag" + }, + "model": "auth.permission", + "pk": 38 + }, + { + "fields": { + "codename": "add_taggeditem", + "content_type": 26, + "name": "Can add tagged item" + }, + "model": "auth.permission", + "pk": 39 + }, + { + "fields": { + "codename": "change_taggeditem", + "content_type": 26, + "name": "Can change tagged item" + }, + "model": "auth.permission", + "pk": 40 + }, + { + "fields": { + "codename": "delete_taggeditem", + "content_type": 26, + "name": "Can delete tagged item" + }, + "model": "auth.permission", + "pk": 41 + }, + { + "fields": { + "codename": "view_taggeditem", + "content_type": 26, + "name": "Can view tagged item" + }, + "model": "auth.permission", + "pk": 42 + }, + { + "fields": { + "codename": "add_fluentcomment", + "content_type": 27, + "name": "Can add Comment" + }, + "model": "auth.permission", + "pk": 43 + }, + { + "fields": { + "codename": "change_fluentcomment", + "content_type": 27, + "name": "Can change Comment" + }, + "model": "auth.permission", + "pk": 44 + }, + { + "fields": { + "codename": "delete_fluentcomment", + "content_type": 27, + "name": "Can delete Comment" + }, + "model": "auth.permission", + "pk": 45 + }, + { + "fields": { + "codename": "view_fluentcomment", + "content_type": 27, + "name": "Can view Comment" + }, + "model": "auth.permission", + "pk": 46 + }, + { + "fields": { + "codename": "add_threadedcomment", + "content_type": 28, + "name": "Can add Threaded comment" + }, + "model": "auth.permission", + "pk": 47 + }, + { + "fields": { + "codename": "change_threadedcomment", + "content_type": 28, + "name": "Can change Threaded comment" + }, + "model": "auth.permission", + "pk": 48 + }, + { + "fields": { + "codename": "delete_threadedcomment", + "content_type": 28, + "name": "Can delete Threaded comment" + }, + "model": "auth.permission", + "pk": 49 + }, + { + "fields": { + "codename": "view_threadedcomment", + "content_type": 28, + "name": "Can view Threaded comment" + }, + "model": "auth.permission", + "pk": 50 + }, + { + "fields": { + "codename": "add_comment", + "content_type": 29, + "name": "Can add comment" + }, + "model": "auth.permission", + "pk": 51 + }, + { + "fields": { + "codename": "change_comment", + "content_type": 29, + "name": "Can change comment" + }, + "model": "auth.permission", + "pk": 52 + }, + { + "fields": { + "codename": "delete_comment", + "content_type": 29, + "name": "Can delete comment" + }, + "model": "auth.permission", + "pk": 53 + }, + { + "fields": { + "codename": "view_comment", + "content_type": 29, + "name": "Can view comment" + }, + "model": "auth.permission", + "pk": 54 + }, + { + "fields": { + "codename": "can_moderate", + "content_type": 29, + "name": "Can moderate comments" + }, + "model": "auth.permission", + "pk": 55 + }, + { + "fields": { + "codename": "add_commentflag", + "content_type": 30, + "name": "Can add comment flag" + }, + "model": "auth.permission", + "pk": 56 + }, + { + "fields": { + "codename": "change_commentflag", + "content_type": 30, + "name": "Can change comment flag" + }, + "model": "auth.permission", + "pk": 57 + }, + { + "fields": { + "codename": "delete_commentflag", + "content_type": 30, + "name": "Can delete comment flag" + }, + "model": "auth.permission", + "pk": 58 + }, + { + "fields": { + "codename": "view_commentflag", + "content_type": 30, + "name": "Can view comment flag" + }, + "model": "auth.permission", + "pk": 59 + }, + { + "fields": { + "codename": "add_flatpage", + "content_type": 31, + "name": "Can add flat page" + }, + "model": "auth.permission", + "pk": 60 + }, + { + "fields": { + "codename": "change_flatpage", + "content_type": 31, + "name": "Can change flat page" + }, + "model": "auth.permission", + "pk": 61 + }, + { + "fields": { + "codename": "delete_flatpage", + "content_type": 31, + "name": "Can delete flat page" + }, + "model": "auth.permission", + "pk": 62 + }, + { + "fields": { + "codename": "view_flatpage", + "content_type": 31, + "name": "Can view flat page" + }, + "model": "auth.permission", + "pk": 63 + }, + { + "fields": { + "codename": "add_tree", + "content_type": 32, + "name": "Can add Site Tree" + }, + "model": "auth.permission", + "pk": 64 + }, + { + "fields": { + "codename": "change_tree", + "content_type": 32, + "name": "Can change Site Tree" + }, + "model": "auth.permission", + "pk": 65 + }, + { + "fields": { + "codename": "delete_tree", + "content_type": 32, + "name": "Can delete Site Tree" + }, + "model": "auth.permission", + "pk": 66 + }, + { + "fields": { + "codename": "view_tree", + "content_type": 32, + "name": "Can view Site Tree" + }, + "model": "auth.permission", + "pk": 67 + }, + { + "fields": { + "codename": "add_treeitem", + "content_type": 33, + "name": "Can add Site Tree Item" + }, + "model": "auth.permission", + "pk": 68 + }, + { + "fields": { + "codename": "change_treeitem", + "content_type": 33, + "name": "Can change Site Tree Item" + }, + "model": "auth.permission", + "pk": 69 + }, + { + "fields": { + "codename": "delete_treeitem", + "content_type": 33, + "name": "Can delete Site Tree Item" + }, + "model": "auth.permission", + "pk": 70 + }, + { + "fields": { + "codename": "view_treeitem", + "content_type": 33, + "name": "Can view Site Tree Item" + }, + "model": "auth.permission", + "pk": 71 + }, + { + "fields": { + "codename": "add_token", + "content_type": 34, + "name": "Can add Token" + }, + "model": "auth.permission", + "pk": 72 + }, + { + "fields": { + "codename": "change_token", + "content_type": 34, + "name": "Can change Token" + }, + "model": "auth.permission", + "pk": 73 + }, + { + "fields": { + "codename": "delete_token", + "content_type": 34, + "name": "Can delete Token" + }, + "model": "auth.permission", + "pk": 74 + }, + { + "fields": { + "codename": "view_token", + "content_type": 34, + "name": "Can view Token" + }, + "model": "auth.permission", + "pk": 75 + }, + { + "fields": { + "codename": "add_tokenproxy", + "content_type": 35, + "name": "Can add token" + }, + "model": "auth.permission", + "pk": 76 + }, + { + "fields": { + "codename": "change_tokenproxy", + "content_type": 35, + "name": "Can change token" + }, + "model": "auth.permission", + "pk": 77 + }, + { + "fields": { + "codename": "delete_tokenproxy", + "content_type": 35, + "name": "Can delete token" + }, + "model": "auth.permission", + "pk": 78 + }, + { + "fields": { + "codename": "view_tokenproxy", + "content_type": 35, + "name": "Can view token" + }, + "model": "auth.permission", + "pk": 79 + }, + { + "fields": { + "codename": "add_cislo", + "content_type": 36, + "name": "Can add Číslo" + }, + "model": "auth.permission", + "pk": 80 + }, + { + "fields": { + "codename": "change_cislo", + "content_type": 36, + "name": "Can change Číslo" + }, + "model": "auth.permission", + "pk": 81 + }, + { + "fields": { + "codename": "delete_cislo", + "content_type": 36, + "name": "Can delete Číslo" + }, + "model": "auth.permission", + "pk": 82 + }, + { + "fields": { + "codename": "view_cislo", + "content_type": 36, + "name": "Can view Číslo" + }, + "model": "auth.permission", + "pk": 83 + }, + { + "fields": { + "codename": "add_problem", + "content_type": 2, + "name": "Can add Problém" + }, + "model": "auth.permission", + "pk": 84 + }, + { + "fields": { + "codename": "change_problem", + "content_type": 2, + "name": "Can change Problém" + }, + "model": "auth.permission", + "pk": 85 + }, + { + "fields": { + "codename": "delete_problem", + "content_type": 2, + "name": "Can delete Problém" + }, + "model": "auth.permission", + "pk": 86 + }, + { + "fields": { + "codename": "view_problem", + "content_type": 2, + "name": "Can view Problém" + }, + "model": "auth.permission", + "pk": 87 + }, + { + "fields": { + "codename": "add_resitel", + "content_type": 37, + "name": "Can add Řešitel" + }, + "model": "auth.permission", + "pk": 88 + }, + { + "fields": { + "codename": "change_resitel", + "content_type": 37, + "name": "Can change Řešitel" + }, + "model": "auth.permission", + "pk": 89 + }, + { + "fields": { + "codename": "delete_resitel", + "content_type": 37, + "name": "Can delete Řešitel" + }, + "model": "auth.permission", + "pk": 90 + }, + { + "fields": { + "codename": "view_resitel", + "content_type": 37, + "name": "Can view Řešitel" + }, + "model": "auth.permission", + "pk": 91 + }, + { + "fields": { + "codename": "add_rocnik", + "content_type": 38, + "name": "Can add Ročník" + }, + "model": "auth.permission", + "pk": 92 + }, + { + "fields": { + "codename": "change_rocnik", + "content_type": 38, + "name": "Can change Ročník" + }, + "model": "auth.permission", + "pk": 93 + }, + { + "fields": { + "codename": "delete_rocnik", + "content_type": 38, + "name": "Can delete Ročník" + }, + "model": "auth.permission", + "pk": 94 + }, + { + "fields": { + "codename": "view_rocnik", + "content_type": 38, + "name": "Can view Ročník" + }, + "model": "auth.permission", + "pk": 95 + }, + { + "fields": { + "codename": "add_skola", + "content_type": 39, + "name": "Can add Škola" + }, + "model": "auth.permission", + "pk": 96 + }, + { + "fields": { + "codename": "change_skola", + "content_type": 39, + "name": "Can change Škola" + }, + "model": "auth.permission", + "pk": 97 + }, + { + "fields": { + "codename": "delete_skola", + "content_type": 39, + "name": "Can delete Škola" + }, + "model": "auth.permission", + "pk": 98 + }, + { + "fields": { + "codename": "view_skola", + "content_type": 39, + "name": "Can view Škola" + }, + "model": "auth.permission", + "pk": 99 + }, + { + "fields": { + "codename": "add_soustredeni", + "content_type": 40, + "name": "Can add Soustředění" + }, + "model": "auth.permission", + "pk": 100 + }, + { + "fields": { + "codename": "change_soustredeni", + "content_type": 40, + "name": "Can change Soustředění" + }, + "model": "auth.permission", + "pk": 101 + }, + { + "fields": { + "codename": "delete_soustredeni", + "content_type": 40, + "name": "Can delete Soustředění" + }, + "model": "auth.permission", + "pk": 102 + }, + { + "fields": { + "codename": "view_soustredeni", + "content_type": 40, + "name": "Can view Soustředění" + }, + "model": "auth.permission", + "pk": 103 + }, + { + "fields": { + "codename": "add_reseni", + "content_type": 41, + "name": "Can add Řešení" + }, + "model": "auth.permission", + "pk": 104 + }, + { + "fields": { + "codename": "change_reseni", + "content_type": 41, + "name": "Can change Řešení" + }, + "model": "auth.permission", + "pk": 105 + }, + { + "fields": { + "codename": "delete_reseni", + "content_type": 41, + "name": "Can delete Řešení" + }, + "model": "auth.permission", + "pk": 106 + }, + { + "fields": { + "codename": "view_reseni", + "content_type": 41, + "name": "Can view Řešení" + }, + "model": "auth.permission", + "pk": 107 + }, + { + "fields": { + "codename": "add_prilohareseni", + "content_type": 42, + "name": "Can add Příloha řešení" + }, + "model": "auth.permission", + "pk": 108 + }, + { + "fields": { + "codename": "change_prilohareseni", + "content_type": 42, + "name": "Can change Příloha řešení" + }, + "model": "auth.permission", + "pk": 109 + }, + { + "fields": { + "codename": "delete_prilohareseni", + "content_type": 42, + "name": "Can delete Příloha řešení" + }, + "model": "auth.permission", + "pk": 110 + }, + { + "fields": { + "codename": "view_prilohareseni", + "content_type": 42, + "name": "Can view Příloha řešení" + }, + "model": "auth.permission", + "pk": 111 + }, + { + "fields": { + "codename": "add_nastaveni", + "content_type": 43, + "name": "Can add Nastavení semináře" + }, + "model": "auth.permission", + "pk": 112 + }, + { + "fields": { + "codename": "change_nastaveni", + "content_type": 43, + "name": "Can change Nastavení semináře" + }, + "model": "auth.permission", + "pk": 113 + }, + { + "fields": { + "codename": "delete_nastaveni", + "content_type": 43, + "name": "Can delete Nastavení semináře" + }, + "model": "auth.permission", + "pk": 114 + }, + { + "fields": { + "codename": "view_nastaveni", + "content_type": 43, + "name": "Can view Nastavení semináře" + }, + "model": "auth.permission", + "pk": 115 + }, + { + "fields": { + "codename": "add_soustredeni_ucastnici", + "content_type": 44, + "name": "Can add Účast na soustředění" + }, + "model": "auth.permission", + "pk": 116 + }, + { + "fields": { + "codename": "change_soustredeni_ucastnici", + "content_type": 44, + "name": "Can change Účast na soustředění" + }, + "model": "auth.permission", + "pk": 117 + }, + { + "fields": { + "codename": "delete_soustredeni_ucastnici", + "content_type": 44, + "name": "Can delete Účast na soustředění" + }, + "model": "auth.permission", + "pk": 118 + }, + { + "fields": { + "codename": "view_soustredeni_ucastnici", + "content_type": 44, + "name": "Can view Účast na soustředění" + }, + "model": "auth.permission", + "pk": 119 + }, + { + "fields": { + "codename": "add_novinky", + "content_type": 45, + "name": "Can add Novinka" + }, + "model": "auth.permission", + "pk": 120 + }, + { + "fields": { + "codename": "change_novinky", + "content_type": 45, + "name": "Can change Novinka" + }, + "model": "auth.permission", + "pk": 121 + }, + { + "fields": { + "codename": "delete_novinky", + "content_type": 45, + "name": "Can delete Novinka" + }, + "model": "auth.permission", + "pk": 122 + }, + { + "fields": { + "codename": "view_novinky", + "content_type": 45, + "name": "Can view Novinka" + }, + "model": "auth.permission", + "pk": 123 + }, + { + "fields": { + "codename": "add_organizator", + "content_type": 46, + "name": "Can add Organizátor" + }, + "model": "auth.permission", + "pk": 124 + }, + { + "fields": { + "codename": "change_organizator", + "content_type": 46, + "name": "Can change Organizátor" + }, + "model": "auth.permission", + "pk": 125 + }, + { + "fields": { + "codename": "delete_organizator", + "content_type": 46, + "name": "Can delete Organizátor" + }, + "model": "auth.permission", + "pk": 126 + }, + { + "fields": { + "codename": "view_organizator", + "content_type": 46, + "name": "Can view Organizátor" + }, + "model": "auth.permission", + "pk": 127 + }, + { + "fields": { + "codename": "add_soustredeni_organizatori", + "content_type": 47, + "name": "Can add Účast organizátorů na soustředění" + }, + "model": "auth.permission", + "pk": 128 + }, + { + "fields": { + "codename": "change_soustredeni_organizatori", + "content_type": 47, + "name": "Can change Účast organizátorů na soustředění" + }, + "model": "auth.permission", + "pk": 129 + }, + { + "fields": { + "codename": "delete_soustredeni_organizatori", + "content_type": 47, + "name": "Can delete Účast organizátorů na soustředění" + }, + "model": "auth.permission", + "pk": 130 + }, + { + "fields": { + "codename": "view_soustredeni_organizatori", + "content_type": 47, + "name": "Can view Účast organizátorů na soustředění" + }, + "model": "auth.permission", + "pk": 131 + }, + { + "fields": { + "codename": "add_konfera", + "content_type": 48, + "name": "Can add Konfera" + }, + "model": "auth.permission", + "pk": 132 + }, + { + "fields": { + "codename": "change_konfera", + "content_type": 48, + "name": "Can change Konfera" + }, + "model": "auth.permission", + "pk": 133 + }, + { + "fields": { + "codename": "delete_konfera", + "content_type": 48, + "name": "Can delete Konfera" + }, + "model": "auth.permission", + "pk": 134 + }, + { + "fields": { + "codename": "view_konfera", + "content_type": 48, + "name": "Can view Konfera" + }, + "model": "auth.permission", + "pk": 135 + }, + { + "fields": { + "codename": "add_osoba", + "content_type": 49, + "name": "Can add Osoba" + }, + "model": "auth.permission", + "pk": 136 + }, + { + "fields": { + "codename": "change_osoba", + "content_type": 49, + "name": "Can change Osoba" + }, + "model": "auth.permission", + "pk": 137 + }, + { + "fields": { + "codename": "delete_osoba", + "content_type": 49, + "name": "Can delete Osoba" + }, + "model": "auth.permission", + "pk": 138 + }, + { + "fields": { + "codename": "view_osoba", + "content_type": 49, + "name": "Can view Osoba" + }, + "model": "auth.permission", + "pk": 139 + }, + { + "fields": { + "codename": "add_prijemce", + "content_type": 50, + "name": "Can add příjemce" + }, + "model": "auth.permission", + "pk": 140 + }, + { + "fields": { + "codename": "change_prijemce", + "content_type": 50, + "name": "Can change příjemce" + }, + "model": "auth.permission", + "pk": 141 + }, + { + "fields": { + "codename": "delete_prijemce", + "content_type": 50, + "name": "Can delete příjemce" + }, + "model": "auth.permission", + "pk": 142 + }, + { + "fields": { + "codename": "view_prijemce", + "content_type": 50, + "name": "Can view příjemce" + }, + "model": "auth.permission", + "pk": 143 + }, + { + "fields": { + "codename": "add_text", + "content_type": 51, + "name": "Can add text" + }, + "model": "auth.permission", + "pk": 144 + }, + { + "fields": { + "codename": "change_text", + "content_type": 51, + "name": "Can change text" + }, + "model": "auth.permission", + "pk": 145 + }, + { + "fields": { + "codename": "delete_text", + "content_type": 51, + "name": "Can delete text" + }, + "model": "auth.permission", + "pk": 146 + }, + { + "fields": { + "codename": "view_text", + "content_type": 51, + "name": "Can view text" + }, + "model": "auth.permission", + "pk": 147 + }, + { + "fields": { + "codename": "add_uloha", + "content_type": 16, + "name": "Can add Úloha" + }, + "model": "auth.permission", + "pk": 148 + }, + { + "fields": { + "codename": "change_uloha", + "content_type": 16, + "name": "Can change Úloha" + }, + "model": "auth.permission", + "pk": 149 + }, + { + "fields": { + "codename": "delete_uloha", + "content_type": 16, + "name": "Can delete Úloha" + }, + "model": "auth.permission", + "pk": 150 + }, + { + "fields": { + "codename": "view_uloha", + "content_type": 16, + "name": "Can view Úloha" + }, + "model": "auth.permission", + "pk": 151 + }, + { + "fields": { + "codename": "add_pohadka", + "content_type": 52, + "name": "Can add Pohádka" + }, + "model": "auth.permission", + "pk": 152 + }, + { + "fields": { + "codename": "change_pohadka", + "content_type": 52, + "name": "Can change Pohádka" + }, + "model": "auth.permission", + "pk": 153 + }, + { + "fields": { + "codename": "delete_pohadka", + "content_type": 52, + "name": "Can delete Pohádka" + }, + "model": "auth.permission", + "pk": 154 + }, + { + "fields": { + "codename": "view_pohadka", + "content_type": 52, + "name": "Can view Pohádka" + }, + "model": "auth.permission", + "pk": 155 + }, + { + "fields": { + "codename": "add_tema", + "content_type": 14, + "name": "Can add Téma" + }, + "model": "auth.permission", + "pk": 156 + }, + { + "fields": { + "codename": "change_tema", + "content_type": 14, + "name": "Can change Téma" + }, + "model": "auth.permission", + "pk": 157 + }, + { + "fields": { + "codename": "delete_tema", + "content_type": 14, + "name": "Can delete Téma" + }, + "model": "auth.permission", + "pk": 158 + }, + { + "fields": { + "codename": "view_tema", + "content_type": 14, + "name": "Can view Téma" + }, + "model": "auth.permission", + "pk": 159 + }, + { + "fields": { + "codename": "add_reseni_resitele", + "content_type": 53, + "name": "Can add Řešení řešitelů" + }, + "model": "auth.permission", + "pk": 160 + }, + { + "fields": { + "codename": "change_reseni_resitele", + "content_type": 53, + "name": "Can change Řešení řešitelů" + }, + "model": "auth.permission", + "pk": 161 + }, + { + "fields": { + "codename": "delete_reseni_resitele", + "content_type": 53, + "name": "Can delete Řešení řešitelů" + }, + "model": "auth.permission", + "pk": 162 + }, + { + "fields": { + "codename": "view_reseni_resitele", + "content_type": 53, + "name": "Can view Řešení řešitelů" + }, + "model": "auth.permission", + "pk": 163 + }, + { + "fields": { + "codename": "add_obrazek", + "content_type": 54, + "name": "Can add obrázek" + }, + "model": "auth.permission", + "pk": 164 + }, + { + "fields": { + "codename": "change_obrazek", + "content_type": 54, + "name": "Can change obrázek" + }, + "model": "auth.permission", + "pk": 165 + }, + { + "fields": { + "codename": "delete_obrazek", + "content_type": 54, + "name": "Can delete obrázek" + }, + "model": "auth.permission", + "pk": 166 + }, + { + "fields": { + "codename": "view_obrazek", + "content_type": 54, + "name": "Can view obrázek" + }, + "model": "auth.permission", + "pk": 167 + }, + { + "fields": { + "codename": "add_hodnoceni", + "content_type": 55, + "name": "Can add Hodnocení" + }, + "model": "auth.permission", + "pk": 168 + }, + { + "fields": { + "codename": "change_hodnoceni", + "content_type": 55, + "name": "Can change Hodnocení" + }, + "model": "auth.permission", + "pk": 169 + }, + { + "fields": { + "codename": "delete_hodnoceni", + "content_type": 55, + "name": "Can delete Hodnocení" + }, + "model": "auth.permission", + "pk": 170 + }, + { + "fields": { + "codename": "view_hodnoceni", + "content_type": 55, + "name": "Can view Hodnocení" + }, + "model": "auth.permission", + "pk": 171 + }, + { + "fields": { + "codename": "add_clanek", + "content_type": 15, + "name": "Can add Článek" + }, + "model": "auth.permission", + "pk": 172 + }, + { + "fields": { + "codename": "change_clanek", + "content_type": 15, + "name": "Can change Článek" + }, + "model": "auth.permission", + "pk": 173 + }, + { + "fields": { + "codename": "delete_clanek", + "content_type": 15, + "name": "Can delete Článek" + }, + "model": "auth.permission", + "pk": 174 + }, + { + "fields": { + "codename": "view_clanek", + "content_type": 15, + "name": "Can view Článek" + }, + "model": "auth.permission", + "pk": 175 + }, + { + "fields": { + "codename": "add_treenode", + "content_type": 1, + "name": "Can add TreeNode" + }, + "model": "auth.permission", + "pk": 176 + }, + { + "fields": { + "codename": "change_treenode", + "content_type": 1, + "name": "Can change TreeNode" + }, + "model": "auth.permission", + "pk": 177 + }, + { + "fields": { + "codename": "delete_treenode", + "content_type": 1, + "name": "Can delete TreeNode" + }, + "model": "auth.permission", + "pk": 178 + }, + { + "fields": { + "codename": "view_treenode", + "content_type": 1, + "name": "Can view TreeNode" + }, + "model": "auth.permission", + "pk": 179 + }, + { + "fields": { + "codename": "add_cislonode", + "content_type": 4, + "name": "Can add Číslo (Node)" + }, + "model": "auth.permission", + "pk": 180 + }, + { + "fields": { + "codename": "change_cislonode", + "content_type": 4, + "name": "Can change Číslo (Node)" + }, + "model": "auth.permission", + "pk": 181 + }, + { + "fields": { + "codename": "delete_cislonode", + "content_type": 4, + "name": "Can delete Číslo (Node)" + }, + "model": "auth.permission", + "pk": 182 + }, + { + "fields": { + "codename": "view_cislonode", + "content_type": 4, + "name": "Can view Číslo (Node)" + }, + "model": "auth.permission", + "pk": 183 + }, + { + "fields": { + "codename": "add_mezicislonode", + "content_type": 5, + "name": "Can add Mezičíslo (Node)" + }, + "model": "auth.permission", + "pk": 184 + }, + { + "fields": { + "codename": "change_mezicislonode", + "content_type": 5, + "name": "Can change Mezičíslo (Node)" + }, + "model": "auth.permission", + "pk": 185 + }, + { + "fields": { + "codename": "delete_mezicislonode", + "content_type": 5, + "name": "Can delete Mezičíslo (Node)" + }, + "model": "auth.permission", + "pk": 186 + }, + { + "fields": { + "codename": "view_mezicislonode", + "content_type": 5, + "name": "Can view Mezičíslo (Node)" + }, + "model": "auth.permission", + "pk": 187 + }, + { + "fields": { + "codename": "add_rocniknode", + "content_type": 3, + "name": "Can add Ročník (Node)" + }, + "model": "auth.permission", + "pk": 188 + }, + { + "fields": { + "codename": "change_rocniknode", + "content_type": 3, + "name": "Can change Ročník (Node)" + }, + "model": "auth.permission", + "pk": 189 + }, + { + "fields": { + "codename": "delete_rocniknode", + "content_type": 3, + "name": "Can delete Ročník (Node)" + }, + "model": "auth.permission", + "pk": 190 + }, + { + "fields": { + "codename": "view_rocniknode", + "content_type": 3, + "name": "Can view Ročník (Node)" + }, + "model": "auth.permission", + "pk": 191 + }, + { + "fields": { + "codename": "add_temavcislenode", + "content_type": 6, + "name": "Can add Téma v čísle (Node)" + }, + "model": "auth.permission", + "pk": 192 + }, + { + "fields": { + "codename": "change_temavcislenode", + "content_type": 6, + "name": "Can change Téma v čísle (Node)" + }, + "model": "auth.permission", + "pk": 193 + }, + { + "fields": { + "codename": "delete_temavcislenode", + "content_type": 6, + "name": "Can delete Téma v čísle (Node)" + }, + "model": "auth.permission", + "pk": 194 + }, + { + "fields": { + "codename": "view_temavcislenode", + "content_type": 6, + "name": "Can view Téma v čísle (Node)" + }, + "model": "auth.permission", + "pk": 195 + }, + { + "fields": { + "codename": "add_textnode", + "content_type": 11, + "name": "Can add Text (Node)" + }, + "model": "auth.permission", + "pk": 196 + }, + { + "fields": { + "codename": "change_textnode", + "content_type": 11, + "name": "Can change Text (Node)" + }, + "model": "auth.permission", + "pk": 197 + }, + { + "fields": { + "codename": "delete_textnode", + "content_type": 11, + "name": "Can delete Text (Node)" + }, + "model": "auth.permission", + "pk": 198 + }, + { + "fields": { + "codename": "view_textnode", + "content_type": 11, + "name": "Can view Text (Node)" + }, + "model": "auth.permission", + "pk": 199 + }, + { + "fields": { + "codename": "add_ulohavzoraknode", + "content_type": 9, + "name": "Can add Vzorák úlohy (Node)" + }, + "model": "auth.permission", + "pk": 200 + }, + { + "fields": { + "codename": "change_ulohavzoraknode", + "content_type": 9, + "name": "Can change Vzorák úlohy (Node)" + }, + "model": "auth.permission", + "pk": 201 + }, + { + "fields": { + "codename": "delete_ulohavzoraknode", + "content_type": 9, + "name": "Can delete Vzorák úlohy (Node)" + }, + "model": "auth.permission", + "pk": 202 + }, + { + "fields": { + "codename": "view_ulohavzoraknode", + "content_type": 9, + "name": "Can view Vzorák úlohy (Node)" + }, + "model": "auth.permission", + "pk": 203 + }, + { + "fields": { + "codename": "add_ulohazadaninode", + "content_type": 8, + "name": "Can add Zadání úlohy (Node)" + }, + "model": "auth.permission", + "pk": 204 + }, + { + "fields": { + "codename": "change_ulohazadaninode", + "content_type": 8, + "name": "Can change Zadání úlohy (Node)" + }, + "model": "auth.permission", + "pk": 205 + }, + { + "fields": { + "codename": "delete_ulohazadaninode", + "content_type": 8, + "name": "Can delete Zadání úlohy (Node)" + }, + "model": "auth.permission", + "pk": 206 + }, + { + "fields": { + "codename": "view_ulohazadaninode", + "content_type": 8, + "name": "Can view Zadání úlohy (Node)" + }, + "model": "auth.permission", + "pk": 207 + }, + { + "fields": { + "codename": "add_pohadkanode", + "content_type": 10, + "name": "Can add Pohádka (Node)" + }, + "model": "auth.permission", + "pk": 208 + }, + { + "fields": { + "codename": "change_pohadkanode", + "content_type": 10, + "name": "Can change Pohádka (Node)" + }, + "model": "auth.permission", + "pk": 209 + }, + { + "fields": { + "codename": "delete_pohadkanode", + "content_type": 10, + "name": "Can delete Pohádka (Node)" + }, + "model": "auth.permission", + "pk": 210 + }, + { + "fields": { + "codename": "view_pohadkanode", + "content_type": 10, + "name": "Can view Pohádka (Node)" + }, + "model": "auth.permission", + "pk": 211 + }, + { + "fields": { + "codename": "add_castnode", + "content_type": 12, + "name": "Can add Část (Node)" + }, + "model": "auth.permission", + "pk": 212 + }, + { + "fields": { + "codename": "change_castnode", + "content_type": 12, + "name": "Can change Část (Node)" + }, + "model": "auth.permission", + "pk": 213 + }, + { + "fields": { + "codename": "delete_castnode", + "content_type": 12, + "name": "Can delete Část (Node)" + }, + "model": "auth.permission", + "pk": 214 + }, + { + "fields": { + "codename": "view_castnode", + "content_type": 12, + "name": "Can view Část (Node)" + }, + "model": "auth.permission", + "pk": 215 + }, + { + "fields": { + "codename": "add_orgtextnode", + "content_type": 7, + "name": "Can add Organizátorský článek (Node)" + }, + "model": "auth.permission", + "pk": 216 + }, + { + "fields": { + "codename": "change_orgtextnode", + "content_type": 7, + "name": "Can change Organizátorský článek (Node)" + }, + "model": "auth.permission", + "pk": 217 + }, + { + "fields": { + "codename": "delete_orgtextnode", + "content_type": 7, + "name": "Can delete Organizátorský článek (Node)" + }, + "model": "auth.permission", + "pk": 218 + }, + { + "fields": { + "codename": "view_orgtextnode", + "content_type": 7, + "name": "Can view Organizátorský článek (Node)" + }, + "model": "auth.permission", + "pk": 219 + }, + { + "fields": { + "codename": "add_reseninode", + "content_type": 13, + "name": "Can add Otištěné řešení (Node)" + }, + "model": "auth.permission", + "pk": 220 + }, + { + "fields": { + "codename": "change_reseninode", + "content_type": 13, + "name": "Can change Otištěné řešení (Node)" + }, + "model": "auth.permission", + "pk": 221 + }, + { + "fields": { + "codename": "delete_reseninode", + "content_type": 13, + "name": "Can delete Otištěné řešení (Node)" + }, + "model": "auth.permission", + "pk": 222 + }, + { + "fields": { + "codename": "view_reseninode", + "content_type": 13, + "name": "Can view Otištěné řešení (Node)" + }, + "model": "auth.permission", + "pk": 223 + }, + { + "fields": { + "codename": "add_konfery_ucastnici", + "content_type": 56, + "name": "Can add Účast na konfeře" + }, + "model": "auth.permission", + "pk": 224 + }, + { + "fields": { + "codename": "change_konfery_ucastnici", + "content_type": 56, + "name": "Can change Účast na konfeře" + }, + "model": "auth.permission", + "pk": 225 + }, + { + "fields": { + "codename": "delete_konfery_ucastnici", + "content_type": 56, + "name": "Can delete Účast na konfeře" + }, + "model": "auth.permission", + "pk": 226 + }, + { + "fields": { + "codename": "view_konfery_ucastnici", + "content_type": 56, + "name": "Can view Účast na konfeře" + }, + "model": "auth.permission", + "pk": 227 + }, + { + "fields": { + "codename": "add_galerie", + "content_type": 57, + "name": "Can add Galerie" + }, + "model": "auth.permission", + "pk": 228 + }, + { + "fields": { + "codename": "change_galerie", + "content_type": 57, + "name": "Can change Galerie" + }, + "model": "auth.permission", + "pk": 229 + }, + { + "fields": { + "codename": "delete_galerie", + "content_type": 57, + "name": "Can delete Galerie" + }, + "model": "auth.permission", + "pk": 230 + }, + { + "fields": { + "codename": "view_galerie", + "content_type": 57, + "name": "Can view Galerie" + }, + "model": "auth.permission", + "pk": 231 + }, + { + "fields": { + "codename": "add_obrazek", + "content_type": 58, + "name": "Can add Obrázek" + }, + "model": "auth.permission", + "pk": 232 + }, + { + "fields": { + "codename": "change_obrazek", + "content_type": 58, + "name": "Can change Obrázek" + }, + "model": "auth.permission", + "pk": 233 + }, + { + "fields": { + "codename": "delete_obrazek", + "content_type": 58, + "name": "Can delete Obrázek" + }, + "model": "auth.permission", + "pk": 234 + }, + { + "fields": { + "codename": "view_obrazek", + "content_type": 58, + "name": "Can view Obrázek" + }, + "model": "auth.permission", + "pk": 235 + }, + { + "fields": { + "codename": "add_korekturovanepdf", + "content_type": 59, + "name": "Can add PDF k opravám" + }, + "model": "auth.permission", + "pk": 236 + }, + { + "fields": { + "codename": "change_korekturovanepdf", + "content_type": 59, + "name": "Can change PDF k opravám" + }, + "model": "auth.permission", + "pk": 237 + }, + { + "fields": { + "codename": "delete_korekturovanepdf", + "content_type": 59, + "name": "Can delete PDF k opravám" + }, + "model": "auth.permission", + "pk": 238 + }, + { + "fields": { + "codename": "view_korekturovanepdf", + "content_type": 59, + "name": "Can view PDF k opravám" + }, + "model": "auth.permission", + "pk": 239 + }, + { + "fields": { + "codename": "add_oprava", + "content_type": 60, + "name": "Can add Oprava" + }, + "model": "auth.permission", + "pk": 240 + }, + { + "fields": { + "codename": "change_oprava", + "content_type": 60, + "name": "Can change Oprava" + }, + "model": "auth.permission", + "pk": 241 + }, + { + "fields": { + "codename": "delete_oprava", + "content_type": 60, + "name": "Can delete Oprava" + }, + "model": "auth.permission", + "pk": 242 + }, + { + "fields": { + "codename": "view_oprava", + "content_type": 60, + "name": "Can view Oprava" + }, + "model": "auth.permission", + "pk": 243 + }, + { + "fields": { + "codename": "add_komentar", + "content_type": 61, + "name": "Can add Komentář k opravě" + }, + "model": "auth.permission", + "pk": 244 + }, + { + "fields": { + "codename": "change_komentar", + "content_type": 61, + "name": "Can change Komentář k opravě" + }, + "model": "auth.permission", + "pk": 245 + }, + { + "fields": { + "codename": "delete_komentar", + "content_type": 61, + "name": "Can delete Komentář k opravě" + }, + "model": "auth.permission", + "pk": 246 + }, + { + "fields": { + "codename": "view_komentar", + "content_type": 61, + "name": "Can view Komentář k opravě" + }, + "model": "auth.permission", + "pk": 247 + }, + { + "fields": { + "codename": "add_hlasovani", + "content_type": 62, + "name": "Can add Hlasování" + }, + "model": "auth.permission", + "pk": 248 + }, + { + "fields": { + "codename": "change_hlasovani", + "content_type": 62, + "name": "Can change Hlasování" + }, + "model": "auth.permission", + "pk": 249 + }, + { + "fields": { + "codename": "delete_hlasovani", + "content_type": 62, + "name": "Can delete Hlasování" + }, + "model": "auth.permission", + "pk": 250 + }, + { + "fields": { + "codename": "view_hlasovani", + "content_type": 62, + "name": "Can view Hlasování" + }, + "model": "auth.permission", + "pk": 251 + }, + { + "fields": { + "codename": "add_prednaska", + "content_type": 63, + "name": "Can add Přednáška" + }, + "model": "auth.permission", + "pk": 252 + }, + { + "fields": { + "codename": "change_prednaska", + "content_type": 63, + "name": "Can change Přednáška" + }, + "model": "auth.permission", + "pk": 253 + }, + { + "fields": { + "codename": "delete_prednaska", + "content_type": 63, + "name": "Can delete Přednáška" + }, + "model": "auth.permission", + "pk": 254 + }, + { + "fields": { + "codename": "view_prednaska", + "content_type": 63, + "name": "Can view Přednáška" + }, + "model": "auth.permission", + "pk": 255 + }, + { + "fields": { + "codename": "add_seznam", + "content_type": 64, + "name": "Can add Seznam přednášek" + }, + "model": "auth.permission", + "pk": 256 + }, + { + "fields": { + "codename": "change_seznam", + "content_type": 64, + "name": "Can change Seznam přednášek" + }, + "model": "auth.permission", + "pk": 257 + }, + { + "fields": { + "codename": "delete_seznam", + "content_type": 64, + "name": "Can delete Seznam přednášek" + }, + "model": "auth.permission", + "pk": 258 + }, + { + "fields": { + "codename": "view_seznam", + "content_type": 64, + "name": "Can view Seznam přednášek" + }, + "model": "auth.permission", + "pk": 259 + }, + { + "fields": { + "codename": "add_fotkaheader", + "content_type": 65, + "name": "Can add fotka do pozadí menu" + }, + "model": "auth.permission", + "pk": 260 + }, + { + "fields": { + "codename": "change_fotkaheader", + "content_type": 65, + "name": "Can change fotka do pozadí menu" + }, + "model": "auth.permission", + "pk": 261 + }, + { + "fields": { + "codename": "delete_fotkaheader", + "content_type": 65, + "name": "Can delete fotka do pozadí menu" + }, + "model": "auth.permission", + "pk": 262 + }, + { + "fields": { + "codename": "view_fotkaheader", + "content_type": 65, + "name": "Can view fotka do pozadí menu" + }, + "model": "auth.permission", + "pk": 263 + }, + { + "fields": { + "codename": "add_fotkaurlvazba", + "content_type": 66, + "name": "Can add vazba url a fotky do pozadí menu" + }, + "model": "auth.permission", + "pk": 264 + }, + { + "fields": { + "codename": "change_fotkaurlvazba", + "content_type": 66, + "name": "Can change vazba url a fotky do pozadí menu" + }, + "model": "auth.permission", + "pk": 265 + }, + { + "fields": { + "codename": "delete_fotkaurlvazba", + "content_type": 66, + "name": "Can delete vazba url a fotky do pozadí menu" + }, + "model": "auth.permission", + "pk": 266 + }, + { + "fields": { + "codename": "view_fotkaurlvazba", + "content_type": 66, + "name": "Can view vazba url a fotky do pozadí menu" + }, + "model": "auth.permission", + "pk": 267 + }, + { + "fields": { + "codename": "add_logentry", + "content_type": 67, + "name": "Can add log entry" + }, + "model": "auth.permission", + "pk": 268 + }, + { + "fields": { + "codename": "change_logentry", + "content_type": 67, + "name": "Can change log entry" + }, + "model": "auth.permission", + "pk": 269 + }, + { + "fields": { + "codename": "delete_logentry", + "content_type": 67, + "name": "Can delete log entry" + }, + "model": "auth.permission", + "pk": 270 + }, + { + "fields": { + "codename": "view_logentry", + "content_type": 67, + "name": "Can view log entry" + }, + "model": "auth.permission", + "pk": 271 + } +] \ No newline at end of file From 749d16ee89e5a8ffd791a750ba84a622795aea7e Mon Sep 17 00:00:00 2001 From: Tomas 'Jethro' Pokorny Date: Tue, 16 Feb 2021 22:00:42 +0100 Subject: [PATCH 10/13] Admin | Udelej orga priradi skupinu a ne opravneni Skupina org ma opravneni org by default, tedy se podedi. --- seminar/admin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/seminar/admin.py b/seminar/admin.py index 9f780cf2..4ce6ded5 100644 --- a/seminar/admin.py +++ b/seminar/admin.py @@ -1,5 +1,5 @@ from django.contrib import admin -from django.contrib.auth.models import Permission +from django.contrib.auth.models import Group from django.db import models from django.forms import widgets @@ -32,11 +32,12 @@ class OsobaAdmin(admin.ModelAdmin): synchronizuj_maily.short_description = "Synchronizuj vybraným osobám e-maily do uživatelů" def udelej_orgem(self,request,queryset): - org_perm = Permission.objects.filter(codename__exact='org').first() + org_group = Group.objects.get(name='org') print(queryset) for o in queryset: user = o.user - user.user_permissions.add(org_perm) + print(user) + user.groups.add(org_group) user.is_staff = True user.save() org = m.Organizator.objects.create(osoba=o) From 4d348ad9c763247615647d05be8857355dd63782 Mon Sep 17 00:00:00 2001 From: Jonas Havelka Date: Tue, 16 Feb 2021 22:42:05 +0100 Subject: [PATCH 11/13] =?UTF-8?q?Detailn=C3=AD=20v=C3=BDsledkovka=20(start?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/templates/seminar/archiv/cislo.html | 41 +++++- seminar/views/views_all.py | 145 ++++++++++++++++++-- 2 files changed, 170 insertions(+), 16 deletions(-) diff --git a/seminar/templates/seminar/archiv/cislo.html b/seminar/templates/seminar/archiv/cislo.html index d191da22..2e912dde 100644 --- a/seminar/templates/seminar/archiv/cislo.html +++ b/seminar/templates/seminar/archiv/cislo.html @@ -74,9 +74,24 @@ # Jméno {% for p in problemy %} - {{ p.kod_v_rocniku }} + {{ p.kod_v_rocniku }} + + {# TODELETE #} + {% for podproblemy in podproblemy_iter.next %} + {{ podproblemy.kod_v_rocniku }} + {% endfor %} + {# TODELETE #} + {% endfor %} {% if ostatni %}Ostatní {% endif %} + + {# TODELETE #} + {% for podproblemy in podproblemy_iter.next %} + {{ podproblemy.kod_v_rocniku }} + {% endfor %} + {# TODELETE #} + + Za číslo Za ročník Odjakživa @@ -90,6 +105,13 @@ {{ rv.resitel.osoba.plne_jmeno }} {% for b in rv.body_problemy_sezn %} {{ b }} + + {# TODELETE #} + {% for body_podproblemu in rv.body_podproblemy_iter.next %} + {{ body_podproblemu }} + {% endfor %} + {# TODELETE #} + {% endfor %} {{ rv.body_cislo }} {{ rv.body_rocnik }} @@ -97,6 +119,23 @@ {% endfor %} + + {# TODELETE #} + + {# TODELETE #} + {% endif %} {% if not cislo.verejna_vysledkovka and user.je_org %} diff --git a/seminar/views/views_all.py b/seminar/views/views_all.py index 24d31ecc..56183114 100644 --- a/seminar/views/views_all.py +++ b/seminar/views/views_all.py @@ -721,15 +721,24 @@ def hlavni_problemy_rocniku(rocnik, jen_verejne=True): return hlavni_problemy -def hlavni_problemy_cisla(cislo): - """ Vrátí seznam všech problémů s body v daném čísle, které již nemají nadproblém. """ - hodnoceni = cislo.hodnoceni.select_related('problem', 'reseni').all() + +def problemy_cisla(cislo): + """ Vrátí seznam všech problémů s body v daném čísle. """ + hodnoceni = cislo.hodnoceni.select_related('problem', 'reseni').all() # hodnocení, která se vážou k danému číslu reseni = [h.reseni for h in hodnoceni] problemy = [h.problem for h in hodnoceni] - problemy_set = set(problemy) # chceme každý problém unikátně, - problemy = (list(problemy_set)) # převedení na množinu a zpět to zaručí + problemy_set = set(problemy) # chceme každý problém unikátně, + problemy = (list(problemy_set)) # převedení na množinu a zpět to zaručí + + return problemy + + +def hlavni_problemy_cisla(cislo, problemy=None): + """ Vrátí seznam všech problémů s body v daném čísle, které již nemají nadproblém. """ + if problemy is None: + problemy = problemy_cisla(cislo) # hlavní problémy čísla # (mají vlastní sloupeček ve výsledkovce, nemají nadproblém) @@ -744,6 +753,27 @@ def hlavni_problemy_cisla(cislo): return hlavni_problemy + +def podproblemy_v_cislu(cislo, problemy=None, hlavni_problemy=None): + """ Vrátí seznam všech problémů s body v daném čísle v poli 'indexovaném' tématy. """ + if problemy is None: + problemy = problemy_cisla(cislo) + if hlavni_problemy is None: + hlavni_problemy = hlavni_problemy_cisla(cislo, problemy) + + podproblemy = dict((hp.id, []) for hp in hlavni_problemy) + hlavni_problemy = set(hlavni_problemy) + podproblemy[-1] = [] + + for problem in problemy: + h_problem = hlavni_problem(problem) + if h_problem in hlavni_problemy: + podproblemy[h_problem.id].append(problem) + else: + podproblemy[-1].append(problem) + + return podproblemy + def body_resitelu(resitele, za, odjakziva=True): """ Funkce počítající počty bodů pro zadané řešitele, buď odjakživa do daného ročníku/čísla anebo za daný ročník/číslo. @@ -940,8 +970,8 @@ class RadekVysledkovkyCisla(object): """Obsahuje věci, které se hodí vědět při konstruování výsledkovky. Umožňuje snazší práci v templatu (lepší, než seznam).""" - def __init__(self, poradi, resitel, body_problemy_sezn, - body_cislo, body_rocnik, body_odjakziva, rok): + def __init__(self, poradi, resitel, body_problemy_sezn, + body_cislo, body_rocnik, body_odjakziva, rok, body_podproblemy, body_podproblemy_iter): self.resitel = resitel self.rocnik_resitele = resitel.rocnik(rok) self.body_cislo = body_cislo @@ -950,7 +980,9 @@ class RadekVysledkovkyCisla(object): self.poradi = poradi self.body_problemy_sezn = body_problemy_sezn self.titul = resitel.get_titul(body_odjakziva) - + self.body_podproblemy = body_podproblemy + self.body_podproblemy_iter = body_podproblemy_iter # TODELETE + def pricti_body(slovnik, resitel, body): """ Přiřazuje danému řešiteli body do slovníku. """ @@ -1039,11 +1071,81 @@ def secti_body_za_cislo(cislo, aktivni_resitele, hlavni_problemy=None): pricti_body(nadproblem_slovnik, resitel, body) return hlavni_problemy_slovnik, cislobody + +def secti_body_za_cislo_podle_temat(cislo, aktivni_resitele, podproblemy=None, temata=None): + """ Spočítá u řešitelů body za číslo za úlohy v jednotlivých hlavních problémech (témata).""" + if temata is None: + temata = hlavni_problemy_cisla(cislo) + + if podproblemy is None: + podproblemy_v_cislu(cislo, hlavni_problemy=temata) + + body_slovnik = {} + for tema in temata: + body_slovnik[tema.id] = {} + for problem in podproblemy[tema.id]: + body_slovnik[tema.id][problem.id] = {} + body_slovnik[-1] = {} + for problem in podproblemy[-1]: + body_slovnik[-1][problem.id] = {} + + # zakládání prázdných záznamů pro řešitele + for ar in aktivni_resitele: + for tema in temata: + for problem in podproblemy[tema.id]: + body_slovnik[tema.id][problem.id][ar.id] = "" + + for problem in podproblemy[-1]: + body_slovnik[-1][problem.id][ar.id] = "" + + temata = set(t.id for t in temata) + + # vezmeme všechna řešení s body do daného čísla + reseni_do_cisla = Reseni.objects.prefetch_related('problem', 'resitele', + 'hodnoceni_set').filter(hodnoceni__cislo_body=cislo) + + # projdeme všechna řešení do čísla a přičteme body každému řešiteli do celkových + # bodů i do bodů za problém + for reseni in reseni_do_cisla: + + # řešení může řešit více problémů + for prob in list(reseni.problem.all()): + nadproblem = hlavni_problem(prob) + if nadproblem.id in temata: + nadproblem_slovnik = body_slovnik[nadproblem.id] + else: + nadproblem_slovnik = body_slovnik[-1] + + problem_slovnik = nadproblem_slovnik[prob.id] + + # a mít více hodnocení + for hodn in list(reseni.hodnoceni_set.all()): + body = hodn.body + + # a mít více řešitelů + for resitel in list(reseni.resitele.all()): + if resitel not in aktivni_resitele: + print("Skipping {}".format(resitel.id)) + continue + pricti_body(problem_slovnik, resitel, body) + return body_slovnik + + +# TODELETE +class FixedIterator: + def next(self): + return self.niter.__next__() + + def __init__(self, niter): + self.niter = niter +# TODELETE + + def vysledkovka_cisla(cislo, context=None): if context is None: context = {} - - hlavni_problemy = hlavni_problemy_cisla(cislo) + problemy = problemy_cisla(cislo) + hlavni_problemy = hlavni_problemy_cisla(cislo, problemy) ## TODO možná chytřeji vybírat aktivní řešitele # aktivní řešitelé - chceme letos něco poslal, TODO později vyfiltrujeme ty, kdo mají # u alespoň jedné hodnoty něco jiného než NULL @@ -1075,6 +1177,10 @@ def vysledkovka_cisla(cislo, context=None): temata_a_spol = list(filter(ne_clanek_ne_konfera, hlavni_problemy)) + # získáme body u jednotlivých témat + podproblemy = podproblemy_v_cislu(cislo, problemy, temata_a_spol) + problemy_slovnik = secti_body_za_cislo_podle_temat(cislo, aktivni_resitele, podproblemy, temata_a_spol) + # def not_empty(value): # return value != '' # @@ -1084,20 +1190,26 @@ def vysledkovka_cisla(cislo, context=None): for ar_id in setrizeni_resitele_id: # získáme seznam bodů za problémy pro daného řešitele - problemy = [] + body_problemy = [] + body_podproblemy = [] for hp in temata_a_spol: - problemy.append(hlavni_problemy_slovnik[hp.id][ar_id]) + body_problemy.append(hlavni_problemy_slovnik[hp.id][ar_id]) + body_podproblemy.append([problemy_slovnik[hp.id][it.id][ar_id] for it in podproblemy[hp.id]]) if je_nejake_ostatni: - problemy.append(hlavni_problemy_slovnik[-1][ar_id]) + body_problemy.append(hlavni_problemy_slovnik[-1][ar_id]) + body_podproblemy.append([problemy_slovnik[-1][it.id][ar_id] for it in podproblemy[-1]]) # vytáhneme informace pro daného řešitele radek = RadekVysledkovkyCisla( poradi[i], # pořadí Resitel.objects.get(id=ar_id), # řešitel (z id) - problemy, # seznam bodů za hlavní problémy čísla + body_problemy, # seznam bodů za hlavní problémy čísla cislobody[ar_id], # body za číslo setrizeni_resitele_body[i], # body za ročník (spočítané výše s pořadím) resitel_odjakzivabody_slov[ar_id], # body odjakživa - cislo.rocnik) # ročník semináře pro zjištění ročníku řešitele + cislo.rocnik, + body_podproblemy, # body všech podproblémů + FixedIterator(body_podproblemy.__iter__()) # TODELETE + ) # ročník semináře pro zjištění ročníku řešitele radky_vysledkovky.append(radek) i += 1 @@ -1106,6 +1218,9 @@ def vysledkovka_cisla(cislo, context=None): context['radky_vysledkovky'] = radky_vysledkovky context['problemy'] = temata_a_spol context['ostatni'] = je_nejake_ostatni + pt = [podproblemy[it.id] for it in temata_a_spol]+[podproblemy[-1]] + context['podproblemy'] = pt + context['podproblemy_iter'] = FixedIterator(pt.__iter__()) # TODELETE #context['v_cisle_zadane'] = TODO #context['resene_problemy'] = resene_problemy return context From 5ec84ad885176a1b013b56cd4c9ecb1376bcb16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aneta=20Pokorn=C3=A1?= Date: Tue, 16 Feb 2021 23:26:52 +0100 Subject: [PATCH 12/13] =?UTF-8?q?=C3=9Aprava=20funkce=20verejne()=20u=20Pr?= =?UTF-8?q?oblemu,=20aby=20zohlednovala=20verejnost=20cisla.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models.py | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/seminar/models.py b/seminar/models.py index 0cae76f0..5f427fb2 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -26,6 +26,7 @@ from taggit.managers import TaggableManager from reversion import revisions as reversion from seminar.utils import roman, FirstTagParser # Pro získání úryvku z TextNode +from seminar import treelib from unidecode import unidecode # Používám pro získání ID odkazu (ještě je to někde po někom zakomentované) @@ -869,13 +870,22 @@ class Problem(SeminarModelBase,PolymorphicModel): stav_verejny = False if self.stav == 'zadany' or self.stav == 'vyreseny': stav_verejny = True - return stav_verejny - - #cislo_verejne = False - #if (self.cislo_zadani and self.cislo_zadani.verejne()): - # cislo_verejne = True - - #return (stav_verejny and cislo_verejne) + print("stav_verejny: {}".format(stav_verejny)) + + cislo_verejne = False + cislonode = self.cislo_node() + if cislonode is None: + # problém nemá vlastní node, veřejnost posuzujeme jen podle stavu + print("empty node") + return stav_verejny + else: + cislo_zadani = cislonode.cislo + if (cislo_zadani and cislo_zadani.verejne()): + print("cislo: {}".format(cislo_zadani)) + cislo_verejne = True + print("stav_verejny: {}".format(stav_verejny)) + print("cislo_verejne: {}".format(cislo_verejne)) + return (stav_verejny and cislo_verejne) verejne.boolean = True def verejne_url(self): @@ -930,6 +940,16 @@ class Tema(Problem): for tvcn in self.temavcislenode_set.all(): tvcn.save() + def cislo_node(self): + tema_node_set = self.temavcislenode_set.all() + tema_cisla_vyskyt = [] + for tn in tema_node_set: + tema_cisla_vyskyt.append( + treelib.get_upper_node_of_type(tn, CisloNode).cislo) + tema_cisla_vyskyt.sort(key=lambda x:x.datum_vydani) + prvni_zadani = tema_cisla_vyskyt[0] + return prvni_zadani.cislonode + class Clanek(Problem): class Meta: db_table = 'seminar_clanky' @@ -946,6 +966,9 @@ class Clanek(Problem): # return self.nadproblem.kod_v_rocniku()+".c{}".format(self.kod) return "c{}".format(self.kod) return '' + + def node(self): + return None class Text(SeminarModelBase): class Meta: @@ -1019,6 +1042,9 @@ class Uloha(Problem): # Neexistující *Node nemá smysl aktualizovat. pass + def cislo_node(self): + zadani_node = self.ulohazadaninode + return treelib.get_upper_node_of_type(zadani_node, CisloNode) @reversion.register(ignore_duplicates=True) class Reseni(SeminarModelBase): @@ -1309,6 +1335,8 @@ class Konfera(Problem): def __str__(self): return "{}: ({})".format(self.nazev, self.soustredeni) + def cislo_node(self): + return None # Vazebna tabulka. Mozna se generuje automaticky. @reversion.register(ignore_duplicates=True) From 729f14e793c093855b360842d35413d04cdb1571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C?= Date: Wed, 17 Feb 2021 08:13:48 +0100 Subject: [PATCH 13/13] =?UTF-8?q?zkr=C3=A1=C5=A1lov=C3=A1n=C3=AD=20deadlin?= =?UTF-8?q?=C5=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/static/css/mamweb.css | 2 +- seminar/templates/seminar/titulnistrana.html | 2 ++ seminar/templates/seminar/zadani/AktualniZadani.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mamweb/static/css/mamweb.css b/mamweb/static/css/mamweb.css index cf8f3e64..ba2f2343 100644 --- a/mamweb/static/css/mamweb.css +++ b/mamweb/static/css/mamweb.css @@ -908,7 +908,7 @@ div.cislo_odkazy ul { } #azad_obrazek { - margin-top: 10px; + margin-top: 15px; } div.zadani_termin { diff --git a/seminar/templates/seminar/titulnistrana.html b/seminar/templates/seminar/titulnistrana.html index b4c9f4f6..6e929965 100644 --- a/seminar/templates/seminar/titulnistrana.html +++ b/seminar/templates/seminar/titulnistrana.html @@ -16,6 +16,7 @@ function sousdeadline() { {% block content %} {% if nejblizsi_deadline %} +

    Do {% if typ_deadline == 'soustredeni' %} @@ -30,6 +31,7 @@ function sousdeadline() { {% endif %}zbývá: {{nejblizsi_deadline|timeuntil}}

    +
    {% endif %}
    diff --git a/seminar/templates/seminar/zadani/AktualniZadani.html b/seminar/templates/seminar/zadani/AktualniZadani.html index 5bcb6ec1..35917947 100644 --- a/seminar/templates/seminar/zadani/AktualniZadani.html +++ b/seminar/templates/seminar/zadani/AktualniZadani.html @@ -13,6 +13,7 @@ {% if user.je_org or verejne %} {% if user.je_org and not verejne %}
    {% endif %} +
    Termíny pro odeslání řešení {{ac.poradi}}. série:
    @@ -29,7 +30,6 @@ {% endif %}
    -
    {% if ac.titulka_nahled and ac.pdf %}