diff --git a/data/sitetree_new.json b/data/sitetree_new.json
index c65aa5be..82fc8245 100644
--- a/data/sitetree_new.json
+++ b/data/sitetree_new.json
@@ -1 +1,816 @@
-[{"model": "sitetree.tree", "pk": 1, "fields": {"title": "Hlavn\u00ed menu", "alias": "main_menu"}}, {"model": "sitetree.treeitem", "pk": 1, "fields": {"title": "Co je M&M", "hint": "", "url": "/co-je-MaM/uvod/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": null, "sort_order": 1, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 2, "fields": {"title": "Jak \u0159e\u0161it", "hint": "", "url": "/jak-resit/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": null, "sort_order": 2, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 3, "fields": {"title": "Aktu\u00e1ln\u00ed
ro\u010dn\u00edk", "hint": "", "url": "/zadani/aktualni/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": null, "sort_order": 3, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 4, "fields": {"title": "Soust\u0159ed\u011bn\u00ed", "hint": "", "url": "/soustredeni/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": null, "sort_order": 4, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 5, "fields": {"title": "Archiv", "hint": "", "url": "/archiv/rocniky/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": null, "sort_order": 5, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 6, "fields": {"title": "P\u0159ihl\u00e1sit", "hint": "", "url": "/login/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": true, "access_restricted": false, "access_perm_type": 1, "parent": null, "sort_order": 6, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 7, "fields": {"title": "\u00davod", "hint": "", "url": "/co-je-MaM/uvod/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 1, "sort_order": 7, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 8, "fields": {"title": "Organiz\u00e1to\u0159i", "hint": "", "url": "/co-je-MaM/organizatori/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 1, "sort_order": 8, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 9, "fields": {"title": "FAQ", "hint": "", "url": "/co-je-MaM/FAQ/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 1, "sort_order": 9, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 10, "fields": {"title": "Kontakt", "hint": "", "url": "/co-je-MaM/kontakt/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 1, "sort_order": 10, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 11, "fields": {"title": "T\u00e9mata", "hint": "", "url": "/jak-resit/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 2, "sort_order": 11, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 12, "fields": {"title": "Jak ps\u00e1t p\u0159\u00edsp\u011bvek", "hint": "", "url": "/jak-resit/jak-psat-prispevek/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 2, "sort_order": 12, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 13, "fields": {"title": "Odm\u011bny", "hint": "", "url": "/co-je-MaM/odmeny/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 2, "sort_order": 13, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 16, "fields": {"title": "V\u00fdsledkov\u00e1 listina", "hint": "", "url": "zadani/vysledkova-listina/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 3, "sort_order": 33, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 17, "fields": {"title": "\u010cl\u00e1nky", "hint": "", "url": "/clanky/resitel/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 3, "sort_order": 34, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 18, "fields": {"title": "\u00davod", "hint": "", "url": "/soustredeni/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 4, "sort_order": 18, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 19, "fields": {"title": "P\u0159ipravujeme", "hint": "", "url": "/soustredeni/pripravujeme/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 4, "sort_order": 19, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 20, "fields": {"title": "Prob\u011bhlo", "hint": "", "url": "/soustredeni/probehlo/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 4, "sort_order": 20, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 21, "fields": {"title": "Profil", "hint": "", "url": "/profil/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": true, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": null, "sort_order": 21, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 22, "fields": {"title": "Osobn\u00ed \u00fadaje", "hint": "", "url": "/resitel_edit", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 21, "sort_order": 23, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 23, "fields": {"title": "Poslat \u0159e\u0161en\u00ed", "hint": "", "url": "/temp/nahraj_reseni", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": true, "access_perm_type": 1, "parent": 21, "sort_order": 36, "access_permissions": [2]}}, {"model": "sitetree.treeitem", "pk": 24, "fields": {"title": "T\u00e9mata", "hint": "", "url": "/archiv/temata/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 5, "sort_order": 35, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 28, "fields": {"title": "HIDDEN", "hint": "", "url": "/korektury/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": true, "access_perm_type": 1, "parent": null, "sort_order": 28, "access_permissions": [1]}}, {"model": "sitetree.treeitem", "pk": 30, "fields": {"title": "Aktu\u00e1ln\u00ed", "hint": "", "url": "/korektury/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 28, "sort_order": 30, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 31, "fields": {"title": "Zastaral\u00e9", "hint": "", "url": "/korektury/zastarale/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 28, "sort_order": 31, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 32, "fields": {"title": "N\u00e1pov\u011bda", "hint": "", "url": "/korektury/help/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 28, "sort_order": 32, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 33, "fields": {"title": "Aktu\u00e1ln\u00ed \u010d\u00edslo", "hint": "", "url": "/zadani/aktualni/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 3, "sort_order": 15, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 34, "fields": {"title": "T\u00e9mata", "hint": "", "url": "/zadani/temata/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 3, "sort_order": 17, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 35, "fields": {"title": "\u010c\u00edsla", "hint": "", "url": "/archiv/rocniky/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 5, "sort_order": 24, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 36, "fields": {"title": "\u00davod", "hint": "", "url": "/profil/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 21, "sort_order": 22, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 37, "fields": {"title": "Odhl\u00e1sit se", "hint": "", "url": "/logout", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 21, "sort_order": 38, "access_permissions": []}}, {"model": "sitetree.treeitem", "pk": 38, "fields": {"title": "P\u0159idat \u0159e\u0161en\u00ed", "hint": "", "url": "/temp/add_solution", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": true, "access_perm_type": 1, "parent": 21, "sort_order": 37, "access_permissions": [1]}}, {"model": "sitetree.treeitem", "pk": 39, "fields": {"title": "\u0158e\u0161itelsk\u00e9 \u010dl\u00e1nky", "hint": "", "url": "/archiv/clanky/", "urlaspattern": false, "tree": 1, "hidden": false, "alias": null, "description": "", "inmenu": true, "inbreadcrumbs": true, "insitetree": true, "access_loggedin": false, "access_guest": false, "access_restricted": false, "access_perm_type": 1, "parent": 5, "sort_order": 39, "access_permissions": []}}]
\ No newline at end of file
+[
+ {
+ "model": "sitetree.tree",
+ "pk": 1,
+ "fields": {
+ "title": "Hlavní menu",
+ "alias": "main_menu"
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 1,
+ "fields": {
+ "title": "Co je M&M",
+ "hint": "",
+ "url": "/co-je-MaM/uvod/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": null,
+ "sort_order": 1,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 2,
+ "fields": {
+ "title": "Jak řešit",
+ "hint": "",
+ "url": "/jak-resit/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": null,
+ "sort_order": 2,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 3,
+ "fields": {
+ "title": "Aktuální
ročník",
+ "hint": "",
+ "url": "/zadani/aktualni/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": null,
+ "sort_order": 3,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 4,
+ "fields": {
+ "title": "Soustředění",
+ "hint": "",
+ "url": "/soustredeni/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": null,
+ "sort_order": 4,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 5,
+ "fields": {
+ "title": "Archiv",
+ "hint": "",
+ "url": "/archiv/rocniky/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": null,
+ "sort_order": 5,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 6,
+ "fields": {
+ "title": "Přihlásit",
+ "hint": "",
+ "url": "/login/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": true,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": null,
+ "sort_order": 6,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 7,
+ "fields": {
+ "title": "Úvod",
+ "hint": "",
+ "url": "/co-je-MaM/uvod/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 1,
+ "sort_order": 7,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 8,
+ "fields": {
+ "title": "Organizátoři",
+ "hint": "",
+ "url": "/co-je-MaM/organizatori/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 1,
+ "sort_order": 8,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 9,
+ "fields": {
+ "title": "FAQ",
+ "hint": "",
+ "url": "/co-je-MaM/FAQ/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 1,
+ "sort_order": 9,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 10,
+ "fields": {
+ "title": "Kontakt",
+ "hint": "",
+ "url": "/co-je-MaM/kontakt/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 1,
+ "sort_order": 10,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 11,
+ "fields": {
+ "title": "Témata",
+ "hint": "",
+ "url": "/jak-resit/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 2,
+ "sort_order": 11,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 12,
+ "fields": {
+ "title": "Jak psát příspěvek",
+ "hint": "",
+ "url": "/jak-resit/jak-psat-prispevek/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 2,
+ "sort_order": 12,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 13,
+ "fields": {
+ "title": "Odměny",
+ "hint": "",
+ "url": "/co-je-MaM/odmeny/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 2,
+ "sort_order": 13,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 16,
+ "fields": {
+ "title": "Výsledková listina",
+ "hint": "",
+ "url": "zadani/vysledkova-listina/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 3,
+ "sort_order": 33,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 17,
+ "fields": {
+ "title": "Články",
+ "hint": "",
+ "url": "/clanky/resitel/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 3,
+ "sort_order": 34,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 18,
+ "fields": {
+ "title": "Úvod",
+ "hint": "",
+ "url": "/soustredeni/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 4,
+ "sort_order": 18,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 19,
+ "fields": {
+ "title": "Připravujeme",
+ "hint": "",
+ "url": "/soustredeni/pripravujeme/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 4,
+ "sort_order": 19,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 20,
+ "fields": {
+ "title": "Proběhlo",
+ "hint": "",
+ "url": "/soustredeni/probehlo/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 4,
+ "sort_order": 20,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 21,
+ "fields": {
+ "title": "Profil",
+ "hint": "",
+ "url": "/profil/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": true,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": null,
+ "sort_order": 21,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 22,
+ "fields": {
+ "title": "Osobní údaje",
+ "hint": "",
+ "url": "/profil/osobni-udaje",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 21,
+ "sort_order": 23,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 23,
+ "fields": {
+ "title": "Poslat řešení",
+ "hint": "",
+ "url": "/odeslat-reseni/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 21,
+ "sort_order": 36,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 24,
+ "fields": {
+ "title": "Témata",
+ "hint": "",
+ "url": "/archiv/temata/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 5,
+ "sort_order": 35,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 28,
+ "fields": {
+ "title": "HIDDEN",
+ "hint": "",
+ "url": "/korektury/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": true,
+ "access_perm_type": 1,
+ "parent": null,
+ "sort_order": 28,
+ "access_permissions": [
+ 1
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 30,
+ "fields": {
+ "title": "Aktuální",
+ "hint": "",
+ "url": "/korektury/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 28,
+ "sort_order": 30,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 31,
+ "fields": {
+ "title": "Zastaralé",
+ "hint": "",
+ "url": "/korektury/zastarale/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 28,
+ "sort_order": 31,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 32,
+ "fields": {
+ "title": "Nápověda",
+ "hint": "",
+ "url": "/korektury/help/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 28,
+ "sort_order": 32,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 33,
+ "fields": {
+ "title": "Aktuální číslo",
+ "hint": "",
+ "url": "/zadani/aktualni/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 3,
+ "sort_order": 15,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 34,
+ "fields": {
+ "title": "Témata",
+ "hint": "",
+ "url": "/zadani/temata/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 3,
+ "sort_order": 17,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 35,
+ "fields": {
+ "title": "Čísla",
+ "hint": "",
+ "url": "/archiv/rocniky/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 5,
+ "sort_order": 24,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 36,
+ "fields": {
+ "title": "Úvod",
+ "hint": "",
+ "url": "/profil/",
+ "urlaspattern": false,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": false,
+ "access_perm_type": 1,
+ "parent": 21,
+ "sort_order": 22,
+ "access_permissions": [
+
+ ]
+ }
+ },
+ {
+ "model": "sitetree.treeitem",
+ "pk": 37,
+ "fields": {
+ "title": "Odevzdaná řešení",
+ "hint": "",
+ "url": "odevzdavatko_tabulka",
+ "urlaspattern": true,
+ "tree": 1,
+ "hidden": false,
+ "alias": null,
+ "description": "",
+ "inmenu": true,
+ "inbreadcrumbs": true,
+ "insitetree": true,
+ "access_loggedin": false,
+ "access_guest": false,
+ "access_restricted": true,
+ "access_perm_type": 1,
+ "parent": 21,
+ "sort_order": 37,
+ "access_permissions": [
+ 1
+ ]
+ }
+ }
+]
diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py
index bec16f7f..7a2bf85b 100644
--- a/mamweb/settings_common.py
+++ b/mamweb/settings_common.py
@@ -295,6 +295,9 @@ LOGGING = {
},
}
+# Permissions for uploads
+FILE_UPLOAD_PERMISSIONS = 0o0644
+
# MaM specific
SEMINAR_RESENI_DIR = os.path.join('reseni')
diff --git a/seminar/models.py b/seminar/models.py
index 6324da25..1bbf5514 100644
--- a/seminar/models.py
+++ b/seminar/models.py
@@ -747,15 +747,18 @@ class Problem(SeminarModelBase,PolymorphicModel):
def verejne(self):
# aktuálně podle stavu problému
# FIXME pro některé problémy možná chceme override
+ # FIXME vrací veřejnost čistě problému, nezávisle na čísle, ve kterém je.
+ # Je to tak správně?
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
+ #cislo_verejne = False
+ #if (self.cislo_zadani and self.cislo_zadani.verejne()):
+ # cislo_verejne = True
- return (stav_verejny and cislo_verejne)
+ #return (stav_verejny and cislo_verejne)
verejne.boolean = True
def verejne_url(self):
@@ -993,7 +996,7 @@ def aux_generate_filename(self, filename):
unidecode(filename.replace('/', '-').replace('\0', ''))
)
datedir = timezone.now().strftime('%Y-%m')
- fname = "{}_{}".format(
+ fname = "{}/{}".format(
timezone.now().strftime('%Y-%m-%d-%H:%M'),
clean)
return os.path.join(datedir, fname)
@@ -1046,6 +1049,11 @@ class PrilohaReseni(SeminarModelBase):
def __str__(self):
return str(self.soubor)
+ def split(self):
+ "Vrátí cestu rozsekanou po složkách. To se hodí v templatech"
+ # Věřím, že tohle funguje, případně použít os.path nebo pathlib.
+ return self.soubor.url.split('/')
+
class Pohadka(SeminarModelBase):
"""Kus pohádky před/za úlohou v čísle"""
diff --git a/seminar/templates/seminar/odevzdavatko/detail.html b/seminar/templates/seminar/odevzdavatko/detail.html
new file mode 100644
index 00000000..6cee990d
--- /dev/null
+++ b/seminar/templates/seminar/odevzdavatko/detail.html
@@ -0,0 +1,47 @@
+{% extends "base.html" %}
+
+{% block content %}
+
+
Řešené problémy: {{ object.problem.all | join:", " }}
+ +Řešitelé: {{ object.resitele.all | join:", " }}
+ +{# https://docs.djangoproject.com/en/3.1/ref/models/instances/#django.db.models.Model.get_FOO_display #} +Forma: {{ object.get_forma_display }}, doručeno {{ object.cas_doruceni }}
+ +{# Soubory: #} +Soubor | Řešitelova poznámka | Datum |
---|---|---|
{{ priloha.split | last }} | +{{ priloha.res_poznamka }} | +{{ priloha.vytvoreno }} |
Žádné přílohy
+{% endif %} + +{# Hodnocení: #} +{# FIXME: Udělat jako formulář #} +Problém | Body | Číslo pro body |
---|---|---|
{{ h.problem }} | +{{ h.body }} | +{{ h.cislo_body }} |
Ještě nebylo hodnoceno
+{% endif %} + + +{% endblock %} diff --git a/seminar/templates/seminar/odevzdavatko/seznam.html b/seminar/templates/seminar/odevzdavatko/seznam.html new file mode 100644 index 00000000..b58dcb54 --- /dev/null +++ b/seminar/templates/seminar/odevzdavatko/seznam.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block content %} + +{# Prázdná buňka v levém horním rohu #} + {% for p in problemy %} + | + {# TODO: Přehled řešení k problému, odkázaný odsud? #} + {{ p }} + | + {% endfor %} +
---|---|
+ {# TODO: Chceme mít view i na řešení konkrétního řešitele ke všem problémům? #} + {{ resitel }} + | + {% for hodn in hodnoty %} +
+ {% if hodn %}
+
+ {{ hodn.pocet_reseni }} řeš. {{ hodn.body }} b {{ hodn.posledni_odevzdani|kratke_datum|default_if_none:"Nikdy"|default:"???"}} + + {% endif %} + |
+ {% endfor %}
+