@ -0,0 +1,187 @@ |
|||||
|
Jak zvládnout migrace na nový model: |
||||
|
|
||||
|
- V mojí verzi databáze mají úlohy-Problémy typ "b'uloha'" |
||||
|
|
||||
|
|
||||
|
Log migrace na nový model: |
||||
|
|
||||
|
Operations to perform: |
||||
|
Apply all migrations: admin, auth, contenttypes, django_comments, flatpages, fluent_comments, galerie, korektury, prednasky, reversion, seminar, sessions, sites, sitetree, taggit, threadedcomments |
||||
|
Running migrations: |
||||
|
Applying admin.0003_logentry_add_action_flag_choices... OK |
||||
|
Applying auth.0009_alter_user_last_name_max_length... OK |
||||
|
Applying auth.0010_alter_group_name_max_length... OK |
||||
|
Applying auth.0011_update_proxy_permissions... OK |
||||
|
Applying galerie.0008_auto_20190430_2340... OK |
||||
|
Applying galerie.0009_auto_20190610_2358... OK |
||||
|
Applying galerie.0010_auto_20200819_0947... OK |
||||
|
Applying korektury.0016_auto_20190430_2340... OK |
||||
|
Applying korektury.0017_auto_20190610_2358... OK |
||||
|
Applying prednasky.0011_auto_20190430_2340... OK |
||||
|
Applying prednasky.0012_auto_20190610_2358... OK |
||||
|
Applying seminar.0049_auto_20190430_2354... OK |
||||
|
Applying seminar.0050_auto_20190510_2228... OK |
||||
|
Applying seminar.0051_resitel_to_osoba... OK |
||||
|
Applying seminar.0052_user_to_organizator... OK |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2004-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (1998-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2017-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2017-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2014-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2011-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2013-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2004-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2013-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2012-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2007-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2011-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2009-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2009-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2008-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2005-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2015-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2001-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2010-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2008-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2006-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2002-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2005-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (1999-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2003-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2000-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2002-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2001-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (1996-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2000-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (1999-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (1996-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (1994-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2012-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2016-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2018-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2014-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2019-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2006-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (1995-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_do received a naive datetime (2007-12-31 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2015-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2016-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2018-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2019-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
/aux/akce/mam/www/mamweb-test/env/lib/python3.7/site-packages/django/db/models/fields/__init__.py:1427: RuntimeWarning: DateTimeField Organizator.organizuje_od received a naive datetime (2020-01-01 00:00:00) while time zone support is active. |
||||
|
RuntimeWarning) |
||||
|
Applying seminar.0053_organizator_organizuje_od_do... OK |
||||
|
Applying seminar.0055_smazat_nemigrovane_zastarale_veci... OK |
||||
|
Applying seminar.0056_vrcholy_pro_rocniky_a_cisla... OK |
||||
|
Applying seminar.0057_reseni_to_reseni_hodnoceni...!!!!!!!!!!!!!!! |
||||
|
31397 Reseni object (31397) |
||||
|
!!!!!!!!!!!!!!! |
||||
|
!!!!!!!!!!!!!!! |
||||
|
31396 Reseni object (31396) |
||||
|
!!!!!!!!!!!!!!! |
||||
|
!!!!!!!!!!!!!!! |
||||
|
31395 Reseni object (31395) |
||||
|
!!!!!!!!!!!!!!! |
||||
|
!!!!!!!!!!!!!!! |
||||
|
31394 Reseni object (31394) |
||||
|
!!!!!!!!!!!!!!! |
||||
|
!!!!!!!!!!!!!!! |
||||
|
31393 Reseni object (31393) |
||||
|
!!!!!!!!!!!!!!! |
||||
|
OK |
||||
|
Applying seminar.0058_problem_to_uloha_tema_clanek... OK |
||||
|
Applying seminar.fix_0058... OK |
||||
|
Applying seminar.0059_vytvorit_pohadkanode... OK |
||||
|
Applying seminar.0060_spoj_stromy... OK |
||||
|
Applying seminar.0061_kill_frankenstein... OK |
||||
|
Applying seminar.0062_redukce_modelu_pohadky... OK |
||||
|
Applying seminar.0063_procisteni_migraci... OK |
||||
|
Applying seminar.0064_auto_20190610_2358... OK |
||||
|
Applying seminar.0065_treenode_polymorphic_ctype... OK |
||||
|
Applying seminar.0066_problem_polymorphic_ctype... OK |
||||
|
Applying seminar.0067_auto_20190814_0805... OK |
||||
|
Applying seminar.0068_treenode_nazev... OK |
||||
|
Applying seminar.0069_auto_20191120_2115... OK |
||||
|
Applying seminar.0070_auto_20191120_2357... OK |
||||
|
Applying seminar.0071_remove_nastaveni_aktualni_rocnik... OK |
||||
|
Applying seminar.0072_auto_20191204_2257... OK |
||||
|
Applying seminar.0073_copy_osoba_email_to_user_email... OK |
||||
|
Applying seminar.0074_auto_20200228_1401... OK |
||||
|
Applying seminar.0075_auto_20200228_2010... OK |
||||
|
Applying seminar.0076_auto_20200228_2013... OK |
||||
|
Applying seminar.0077_auto_20200318_2146... OK |
||||
|
Applying seminar.0078_otistenereseninode... OK |
||||
|
Applying seminar.0079_clanek_resitelsky... OK |
||||
|
Applying seminar.0080_zruseni_claneknode_a_konferanode... OK |
||||
|
Applying seminar.0081_auto_20200408_2221... OK |
||||
|
Applying seminar.0082_auto_20200506_1951... OK |
||||
|
Applying seminar.0083_auto_20200506_1952... OK |
||||
|
WARNING 2020-08-20 00:49:07,941 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2215) |
||||
|
WARNING 2020-08-20 00:49:07,953 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2221) |
||||
|
WARNING 2020-08-20 00:49:07,959 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2212) |
||||
|
WARNING 2020-08-20 00:49:07,965 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (1955) |
||||
|
WARNING 2020-08-20 00:49:07,968 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2027) |
||||
|
WARNING 2020-08-20 00:49:07,971 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (1981) |
||||
|
WARNING 2020-08-20 00:49:07,974 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (1970) |
||||
|
WARNING 2020-08-20 00:49:07,978 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2001) |
||||
|
WARNING 2020-08-20 00:49:07,981 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2004) |
||||
|
WARNING 2020-08-20 00:49:07,984 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (1941) |
||||
|
WARNING 2020-08-20 00:49:07,990 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2024) |
||||
|
WARNING 2020-08-20 00:49:07,993 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2031) |
||||
|
WARNING 2020-08-20 00:49:07,997 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2211) |
||||
|
WARNING 2020-08-20 00:49:08,005 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2073) |
||||
|
WARNING 2020-08-20 00:49:08,017 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2018) |
||||
|
WARNING 2020-08-20 00:49:08,022 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2222) |
||||
|
WARNING 2020-08-20 00:49:08,028 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (1953) |
||||
|
WARNING 2020-08-20 00:49:08,034 0084_clanek_cislo: Více než jedno řešení pro článek Clanek object (2026) |
||||
|
Applying seminar.0084_clanek_cislo... OK |
||||
|
Applying seminar.0085_nepovinna_prezdivka... OK |
||||
|
Applying seminar.0086_auto_20200819_0959... OK |
||||
|
Applying sitetree.0001_initial... OK |
||||
|
Applying taggit.0003_taggeditem_add_unique_index... OK |
||||
|
|
@ -0,0 +1,637 @@ |
|||||
|
[ |
||||
|
{ |
||||
|
"codename": "org", |
||||
|
"ct_app_label": "auth", |
||||
|
"ct_model": "user" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_flatpage", |
||||
|
"ct_app_label": "flatpages", |
||||
|
"ct_model": "flatpage" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_flatpage", |
||||
|
"ct_app_label": "flatpages", |
||||
|
"ct_model": "flatpage" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_flatpage", |
||||
|
"ct_app_label": "flatpages", |
||||
|
"ct_model": "flatpage" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_flatpage", |
||||
|
"ct_app_label": "flatpages", |
||||
|
"ct_model": "flatpage" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_galerie", |
||||
|
"ct_app_label": "galerie", |
||||
|
"ct_model": "galerie" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_galerie", |
||||
|
"ct_app_label": "galerie", |
||||
|
"ct_model": "galerie" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_galerie", |
||||
|
"ct_app_label": "galerie", |
||||
|
"ct_model": "galerie" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_galerie", |
||||
|
"ct_app_label": "galerie", |
||||
|
"ct_model": "galerie" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_obrazek", |
||||
|
"ct_app_label": "galerie", |
||||
|
"ct_model": "obrazek" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_obrazek", |
||||
|
"ct_app_label": "galerie", |
||||
|
"ct_model": "obrazek" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_obrazek", |
||||
|
"ct_app_label": "galerie", |
||||
|
"ct_model": "obrazek" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_obrazek", |
||||
|
"ct_app_label": "galerie", |
||||
|
"ct_model": "obrazek" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_komentar", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "komentar" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_komentar", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "komentar" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_komentar", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "komentar" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_komentar", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "komentar" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_korekturovanepdf", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "korekturovanepdf" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_korekturovanepdf", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "korekturovanepdf" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_korekturovanepdf", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "korekturovanepdf" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_korekturovanepdf", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "korekturovanepdf" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_oprava", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "oprava" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_oprava", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "oprava" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_oprava", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "oprava" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_oprava", |
||||
|
"ct_app_label": "korektury", |
||||
|
"ct_model": "oprava" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_hlasovani", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "hlasovani" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_hlasovani", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "hlasovani" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_hlasovani", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "hlasovani" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_hlasovani", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "hlasovani" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_prednaska", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "prednaska" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_prednaska", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "prednaska" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_prednaska", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "prednaska" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_prednaska", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "prednaska" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_seznam", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "seznam" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_seznam", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "seznam" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_seznam", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "seznam" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_seznam", |
||||
|
"ct_app_label": "prednasky", |
||||
|
"ct_model": "seznam" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_cislo", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "cislo" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_cislo", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "cislo" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_cislo", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "cislo" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_cislo", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "cislo" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_clanek", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "clanek" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_clanek", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "clanek" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_clanek", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "clanek" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_clanek", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "clanek" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_konfera", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "konfera" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_konfera", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "konfera" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_konfera", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "konfera" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_konfera", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "konfera" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_konfery_ucastnici", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "konfery_ucastnici" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_konfery_ucastnici", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "konfery_ucastnici" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_konfery_ucastnici", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "konfery_ucastnici" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_konfery_ucastnici", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "konfery_ucastnici" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_nastaveni", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "nastaveni" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_nastaveni", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "nastaveni" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_nastaveni", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "nastaveni" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_nastaveni", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "nastaveni" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_novinky", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "novinky" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_novinky", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "novinky" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_novinky", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "novinky" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_novinky", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "novinky" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_organizator", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "organizator" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_organizator", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "organizator" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_organizator", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "organizator" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_organizator", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "organizator" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_osoba", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "osoba" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_osoba", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "osoba" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_osoba", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "osoba" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_osoba", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "osoba" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_pohadka", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "pohadka" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_pohadka", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "pohadka" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_pohadka", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "pohadka" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_pohadka", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "pohadka" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_prijemce", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "prijemce" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_prijemce", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "prijemce" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_prijemce", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "prijemce" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_prijemce", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "prijemce" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_problem", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "problem" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_problem", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "problem" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_problem", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "problem" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_problem", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "problem" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_resitel", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "resitel" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_resitel", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "resitel" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_resitel", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "resitel" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_resitel", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "resitel" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_rocnik", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "rocnik" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_rocnik", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "rocnik" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_rocnik", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "rocnik" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_rocnik", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "rocnik" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_skola", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "skola" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_skola", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "skola" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_skola", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "skola" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_skola", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "skola" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_soustredeni", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_soustredeni", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_soustredeni", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_soustredeni", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_soustredeni_organizatori", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni_organizatori" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_soustredeni_organizatori", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni_organizatori" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_soustredeni_organizatori", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni_organizatori" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_soustredeni_organizatori", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni_organizatori" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_soustredeni_ucastnici", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni_ucastnici" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_soustredeni_ucastnici", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni_ucastnici" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_soustredeni_ucastnici", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni_ucastnici" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_soustredeni_ucastnici", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "soustredeni_ucastnici" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_tema", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "tema" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_tema", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "tema" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_tema", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "tema" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_tema", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "tema" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_uloha", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "uloha" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_uloha", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "uloha" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_uloha", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "uloha" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_uloha", |
||||
|
"ct_app_label": "seminar", |
||||
|
"ct_model": "uloha" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_tag", |
||||
|
"ct_app_label": "taggit", |
||||
|
"ct_model": "tag" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_tag", |
||||
|
"ct_app_label": "taggit", |
||||
|
"ct_model": "tag" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_tag", |
||||
|
"ct_app_label": "taggit", |
||||
|
"ct_model": "tag" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_tag", |
||||
|
"ct_app_label": "taggit", |
||||
|
"ct_model": "tag" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_taggeditem", |
||||
|
"ct_app_label": "taggit", |
||||
|
"ct_model": "taggeditem" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_taggeditem", |
||||
|
"ct_app_label": "taggit", |
||||
|
"ct_model": "taggeditem" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "delete_taggeditem", |
||||
|
"ct_app_label": "taggit", |
||||
|
"ct_model": "taggeditem" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_taggeditem", |
||||
|
"ct_app_label": "taggit", |
||||
|
"ct_model": "taggeditem" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_fotkaheader", |
||||
|
"ct_app_label": "header_fotky", |
||||
|
"ct_model": "fotkaheader" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_fotkaheader", |
||||
|
"ct_app_label": "header_fotky", |
||||
|
"ct_model": "fotkaheader" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_fotkaheader", |
||||
|
"ct_app_label": "header_fotky", |
||||
|
"ct_model": "fotkaheader" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "add_fotkaurlvazba", |
||||
|
"ct_app_label": "header_fotky", |
||||
|
"ct_model": "fotkaurlvazba" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "change_fotkaurlvazba", |
||||
|
"ct_app_label": "header_fotky", |
||||
|
"ct_model": "fotkaurlvazba" |
||||
|
}, |
||||
|
{ |
||||
|
"codename": "view_fotkaurlvazba", |
||||
|
"ct_app_label": "header_fotky", |
||||
|
"ct_model": "fotkaurlvazba" |
||||
|
} |
||||
|
] |
@ -0,0 +1,10 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
# Props to https://www.commandlinefu.com/commands/view/8234/check-broken-links-using-wget-as-a-spider |
||||
|
set -eu |
||||
|
|
||||
|
logfile="$(pwd)/wget.log.$(date +%FT%T)" |
||||
|
tmp=$(mktemp --directory) |
||||
|
cd "$tmp" |
||||
|
|
||||
|
wget --spider -o "$logfile" -r -p -X '/soustredeni/*/fotogalerie/' "$@" |
@ -0,0 +1,17 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
if test "$#" -lt 1 |
||||
|
then |
||||
|
echo "Usage: $0 file ..." |
||||
|
exit 2 |
||||
|
fi |
||||
|
|
||||
|
for file in "$@" |
||||
|
do |
||||
|
# Do the sed magic: keep replacing 4 spaces at the begining of line |
||||
|
sed -i -re ' |
||||
|
: loop |
||||
|
s/^( *) /\1 / |
||||
|
t loop |
||||
|
' "$file" |
||||
|
done |
@ -0,0 +1,207 @@ |
|||||
|
[ |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "baliky.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/baliky.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "beh.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/beh.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "kryptografie.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/kryptografie.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "mam_cernobile.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/mam_cernobile.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "noc.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/noc.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "ohen.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/ohen.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "snih.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/snih.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "spolecna.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/spolecna.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "stiny.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/stiny.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "vikendovka.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/vikendovka.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaheader", |
||||
|
"pk": "vylet.jpg", |
||||
|
"fields": { |
||||
|
"cas": "2020-09-20T09:18:34.562Z", |
||||
|
"fotka": "header/vylet.jpg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 1, |
||||
|
"fields": { |
||||
|
"url": "/archiv/", |
||||
|
"fotka": "stiny.jpg", |
||||
|
"denni_doba": "oboji" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 2, |
||||
|
"fields": { |
||||
|
"url": "/clanky/", |
||||
|
"fotka": "kryptografie.jpg", |
||||
|
"denni_doba": "den" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 3, |
||||
|
"fields": { |
||||
|
"url": "/clanky/", |
||||
|
"fotka": "ohen.jpg", |
||||
|
"denni_doba": "noc" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 4, |
||||
|
"fields": { |
||||
|
"url": "/aktualni/", |
||||
|
"fotka": "baliky.jpg", |
||||
|
"denni_doba": "den" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 5, |
||||
|
"fields": { |
||||
|
"url": "/aktualni/", |
||||
|
"fotka": "stiny.jpg", |
||||
|
"denni_doba": "noc" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 6, |
||||
|
"fields": { |
||||
|
"url": "/o-nas/", |
||||
|
"fotka": "vikendovka.jpg", |
||||
|
"denni_doba": "den" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 7, |
||||
|
"fields": { |
||||
|
"url": "/o-nas/", |
||||
|
"fotka": "noc.jpg", |
||||
|
"denni_doba": "noc" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 8, |
||||
|
"fields": { |
||||
|
"url": "/soustredeni/", |
||||
|
"fotka": "beh.jpg", |
||||
|
"denni_doba": "den" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 9, |
||||
|
"fields": { |
||||
|
"url": "/soustredeni/", |
||||
|
"fotka": "vylet.jpg", |
||||
|
"denni_doba": "noc" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 10, |
||||
|
"fields": { |
||||
|
"url": "/prihlasit/", |
||||
|
"fotka": "baliky.jpg", |
||||
|
"denni_doba": "den" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 11, |
||||
|
"fields": { |
||||
|
"url": "/prihlasit/", |
||||
|
"fotka": "stiny.jpg", |
||||
|
"denni_doba": "noc" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 12, |
||||
|
"fields": { |
||||
|
"url": "/profil/", |
||||
|
"fotka": "baliky.jpg", |
||||
|
"denni_doba": "den" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"model": "header_fotky.fotkaurlvazba", |
||||
|
"pk": 13, |
||||
|
"fields": { |
||||
|
"url": "/profil/", |
||||
|
"fotka": "stiny.jpg", |
||||
|
"denni_doba": "noc" |
||||
|
} |
||||
|
} |
||||
|
] |
@ -0,0 +1,860 @@ |
|||||
|
[ |
||||
|
{ |
||||
|
"fields": { |
||||
|
"alias": "main_menu", |
||||
|
"title": "Hlavní menu" |
||||
|
}, |
||||
|
"model": "sitetree.tree", |
||||
|
"pk": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"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": null, |
||||
|
"sort_order": 1, |
||||
|
"title": "Co je M&M", |
||||
|
"tree": 1, |
||||
|
"url": "/o-nas/uvod/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 1 |
||||
|
}, |
||||
|
{ |
||||
|
"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": null, |
||||
|
"sort_order": 2, |
||||
|
"title": "Jak řešit", |
||||
|
"tree": 1, |
||||
|
"url": "/jak-resit/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 2 |
||||
|
}, |
||||
|
{ |
||||
|
"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": null, |
||||
|
"sort_order": 3, |
||||
|
"title": "Aktuální<br/> ročník", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_aktualni_zadani", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 3 |
||||
|
}, |
||||
|
{ |
||||
|
"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": null, |
||||
|
"sort_order": 4, |
||||
|
"title": "Soustředění", |
||||
|
"tree": 1, |
||||
|
"url": "/soustredeni/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 4 |
||||
|
}, |
||||
|
{ |
||||
|
"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": null, |
||||
|
"sort_order": 5, |
||||
|
"title": "Archiv", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_archiv_rocniky", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 5 |
||||
|
}, |
||||
|
{ |
||||
|
"fields": { |
||||
|
"access_guest": true, |
||||
|
"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": null, |
||||
|
"sort_order": 6, |
||||
|
"title": "Přihlásit", |
||||
|
"tree": 1, |
||||
|
"url": "login", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 6 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 1, |
||||
|
"sort_order": 7, |
||||
|
"title": "Úvod", |
||||
|
"tree": 1, |
||||
|
"url": "/o-nas/uvod/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 7 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 1, |
||||
|
"sort_order": 8, |
||||
|
"title": "Organizátoři", |
||||
|
"tree": 1, |
||||
|
"url": "organizatori", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 8 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 1, |
||||
|
"sort_order": 10, |
||||
|
"title": "Kontakt", |
||||
|
"tree": 1, |
||||
|
"url": "/o-nas/kontakt/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 10 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 2, |
||||
|
"sort_order": 11, |
||||
|
"title": "Úvod", |
||||
|
"tree": 1, |
||||
|
"url": "/jak-resit/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 11 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 2, |
||||
|
"sort_order": 45, |
||||
|
"title": "Jak psát článek", |
||||
|
"tree": 1, |
||||
|
"url": "/jak-resit/jak-psat-clanek/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 12 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 43, |
||||
|
"title": "Výsledková listina", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_aktualni_vysledky", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"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": 4, |
||||
|
"sort_order": 18, |
||||
|
"title": "Úvod", |
||||
|
"tree": 1, |
||||
|
"url": "/soustredeni/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 18 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 4, |
||||
|
"sort_order": 19, |
||||
|
"title": "Připravujeme", |
||||
|
"tree": 1, |
||||
|
"url": "/soustredeni/pripravujeme/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 19 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 4, |
||||
|
"sort_order": 20, |
||||
|
"title": "Proběhlo", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_seznam_soustredeni", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 20 |
||||
|
}, |
||||
|
{ |
||||
|
"fields": { |
||||
|
"access_guest": false, |
||||
|
"access_loggedin": true, |
||||
|
"access_perm_type": 1, |
||||
|
"access_permissions": [], |
||||
|
"access_restricted": false, |
||||
|
"alias": null, |
||||
|
"description": "", |
||||
|
"hidden": false, |
||||
|
"hint": "", |
||||
|
"inbreadcrumbs": true, |
||||
|
"inmenu": true, |
||||
|
"insitetree": true, |
||||
|
"parent": null, |
||||
|
"sort_order": 21, |
||||
|
"title": "Profil", |
||||
|
"tree": 1, |
||||
|
"url": "profil", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 21 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 21, |
||||
|
"sort_order": 23, |
||||
|
"title": "Osobní údaje", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_resitel_edit", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 22 |
||||
|
}, |
||||
|
{ |
||||
|
"fields": { |
||||
|
"access_guest": false, |
||||
|
"access_loggedin": false, |
||||
|
"access_perm_type": 1, |
||||
|
"access_permissions": [ |
||||
|
2 |
||||
|
], |
||||
|
"access_restricted": true, |
||||
|
"alias": null, |
||||
|
"description": "", |
||||
|
"hidden": false, |
||||
|
"hint": "", |
||||
|
"inbreadcrumbs": true, |
||||
|
"inmenu": true, |
||||
|
"insitetree": true, |
||||
|
"parent": 21, |
||||
|
"sort_order": 36, |
||||
|
"title": "Poslat řešení", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_nahraj_reseni", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 23 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 35, |
||||
|
"title": "Témata", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_archiv_temata", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 24 |
||||
|
}, |
||||
|
{ |
||||
|
"fields": { |
||||
|
"access_guest": false, |
||||
|
"access_loggedin": false, |
||||
|
"access_perm_type": 1, |
||||
|
"access_permissions": [ |
||||
|
1 |
||||
|
], |
||||
|
"access_restricted": true, |
||||
|
"alias": null, |
||||
|
"description": "", |
||||
|
"hidden": false, |
||||
|
"hint": "", |
||||
|
"inbreadcrumbs": true, |
||||
|
"inmenu": true, |
||||
|
"insitetree": true, |
||||
|
"parent": null, |
||||
|
"sort_order": 28, |
||||
|
"title": "HIDDEN", |
||||
|
"tree": 1, |
||||
|
"url": "/korektury/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 28 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 28, |
||||
|
"sort_order": 30, |
||||
|
"title": "Aktuální", |
||||
|
"tree": 1, |
||||
|
"url": "korektury_list", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 30 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 28, |
||||
|
"sort_order": 31, |
||||
|
"title": "Zastaralé", |
||||
|
"tree": 1, |
||||
|
"url": "korektury_stare_list", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 31 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 28, |
||||
|
"sort_order": 32, |
||||
|
"title": "Nápověda", |
||||
|
"tree": 1, |
||||
|
"url": "/korektury/help/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 32 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 15, |
||||
|
"title": "Aktuální číslo", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_aktualni_zadani", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"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": 5, |
||||
|
"sort_order": 24, |
||||
|
"title": "Čísla", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_archiv_rocniky", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 35 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 21, |
||||
|
"sort_order": 22, |
||||
|
"title": "Úvod", |
||||
|
"tree": 1, |
||||
|
"url": "profil", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 36 |
||||
|
}, |
||||
|
{ |
||||
|
"fields": { |
||||
|
"access_guest": false, |
||||
|
"access_loggedin": false, |
||||
|
"access_perm_type": 1, |
||||
|
"access_permissions": [ |
||||
|
1 |
||||
|
], |
||||
|
"access_restricted": true, |
||||
|
"alias": null, |
||||
|
"description": "", |
||||
|
"hidden": false, |
||||
|
"hint": "To, co ŘEŠITELÉ poslali", |
||||
|
"inbreadcrumbs": true, |
||||
|
"inmenu": true, |
||||
|
"insitetree": true, |
||||
|
"parent": 21, |
||||
|
"sort_order": 38, |
||||
|
"title": "Došlá řešení", |
||||
|
"tree": 1, |
||||
|
"url": "odevzdavatko_tabulka", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 37 |
||||
|
}, |
||||
|
{ |
||||
|
"fields": { |
||||
|
"access_guest": false, |
||||
|
"access_loggedin": true, |
||||
|
"access_perm_type": 1, |
||||
|
"access_permissions": [], |
||||
|
"access_restricted": false, |
||||
|
"alias": null, |
||||
|
"description": "", |
||||
|
"hidden": false, |
||||
|
"hint": "", |
||||
|
"inbreadcrumbs": true, |
||||
|
"inmenu": true, |
||||
|
"insitetree": true, |
||||
|
"parent": 21, |
||||
|
"sort_order": 42, |
||||
|
"title": "Odhlásit se", |
||||
|
"tree": 1, |
||||
|
"url": "logout", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 38 |
||||
|
}, |
||||
|
{ |
||||
|
"fields": { |
||||
|
"access_guest": false, |
||||
|
"access_loggedin": false, |
||||
|
"access_perm_type": 1, |
||||
|
"access_permissions": [ |
||||
|
1 |
||||
|
], |
||||
|
"access_restricted": true, |
||||
|
"alias": null, |
||||
|
"description": "", |
||||
|
"hidden": false, |
||||
|
"hint": "", |
||||
|
"inbreadcrumbs": true, |
||||
|
"inmenu": true, |
||||
|
"insitetree": true, |
||||
|
"parent": 21, |
||||
|
"sort_order": 36, |
||||
|
"title": "Nahrát řešení", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_vloz_reseni", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"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 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 1, |
||||
|
"sort_order": 41, |
||||
|
"title": "Odměny", |
||||
|
"tree": 1, |
||||
|
"url": "/o-nas/odmeny/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 41 |
||||
|
}, |
||||
|
{ |
||||
|
"fields": { |
||||
|
"access_guest": false, |
||||
|
"access_loggedin": false, |
||||
|
"access_perm_type": 1, |
||||
|
"access_permissions": [ |
||||
|
2 |
||||
|
], |
||||
|
"access_restricted": true, |
||||
|
"alias": null, |
||||
|
"description": "", |
||||
|
"hidden": false, |
||||
|
"hint": "To, co jsem JÁ odevzdal", |
||||
|
"inbreadcrumbs": true, |
||||
|
"inmenu": true, |
||||
|
"insitetree": true, |
||||
|
"parent": 21, |
||||
|
"sort_order": 37, |
||||
|
"title": "Odevzdaná řešení", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_resitel_odevzdana_reseni", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 42 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 33, |
||||
|
"title": "Aktuální ročník", |
||||
|
"tree": 1, |
||||
|
"url": "seminar_aktualni_rocnik", |
||||
|
"urlaspattern": true |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 43 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 1, |
||||
|
"sort_order": 44, |
||||
|
"title": "Další aktivity", |
||||
|
"tree": 1, |
||||
|
"url": "/o-nas/dalsi-akce/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 44 |
||||
|
}, |
||||
|
{ |
||||
|
"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": 2, |
||||
|
"sort_order": 12, |
||||
|
"title": "Podrobněji", |
||||
|
"tree": 1, |
||||
|
"url": "/jak-resit/podrobneji/", |
||||
|
"urlaspattern": false |
||||
|
}, |
||||
|
"model": "sitetree.treeitem", |
||||
|
"pk": 45 |
||||
|
} |
||||
|
] |
@ -0,0 +1,513 @@ |
|||||
|
#!/usr/bin/env python3 |
||||
|
|
||||
|
import psycopg2 |
||||
|
import psycopg2.extras |
||||
|
|
||||
|
OLD_DB = "mam_old" |
||||
|
NEW_DB = "mamweb" |
||||
|
|
||||
|
oldconn = psycopg2.connect(f"dbname={OLD_DB}") |
||||
|
newconn = psycopg2.connect(f"dbname={NEW_DB}") |
||||
|
|
||||
|
oldcur = oldconn.cursor(cursor_factory=psycopg2.extras.DictCursor) |
||||
|
newcur = newconn.cursor(cursor_factory=psycopg2.extras.DictCursor) |
||||
|
|
||||
|
|
||||
|
# Uses global variables oldcur, newcur! |
||||
|
def execute_simple(old_query, new_query=None): |
||||
|
if new_query is None: |
||||
|
new_query = old_query |
||||
|
|
||||
|
oldcur.execute(old_query) |
||||
|
newcur.execute(new_query) |
||||
|
|
||||
|
if oldcur.rowcount != newcur.rowcount: |
||||
|
raise ValueError(f"Queries '{old_query}' and '{new_query}' returned different number of rows ({oldcur.rowcount} and {newcur.rowcount})") |
||||
|
|
||||
|
return(oldcur.fetchall(), newcur.fetchall()) |
||||
|
|
||||
|
def check_same(old_row, new_row, old_fields, new_fields=None): |
||||
|
if type(old_fields) != list: |
||||
|
old_fields = [old_fields] |
||||
|
|
||||
|
if new_fields is None: |
||||
|
new_fields = old_fields |
||||
|
|
||||
|
fields = zip(old_fields, new_fields) |
||||
|
|
||||
|
for old_field, new_field in fields: |
||||
|
if old_row[old_field] == new_row[new_field]: |
||||
|
continue |
||||
|
raise ValueError(f"Fields '{old_field}'({old_row[old_field]}) and '{new_field}'({new_row[new_field]}) differs for rows \n'{old_row}' and \n'{new_row}'") |
||||
|
return True |
||||
|
|
||||
|
def get_user_id_for_org_id(org_id): |
||||
|
query = """SELECT auth_user.id FROM auth_user |
||||
|
INNER JOIN seminar_osoby ON seminar_osoby.user_id = auth_user.id |
||||
|
INNER JOIN seminar_organizator ON seminar_organizator.osoba_id = seminar_osoby.id |
||||
|
WHERE seminar_organizator.id = %s """ |
||||
|
|
||||
|
newcur.execute(query,(org_id,)) |
||||
|
return newcur.fetchone()['id'] |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
def check_skola(): |
||||
|
old_query = "SELECT * FROM seminar_skoly ORDER BY id" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,['id','aesop_id','izo','nazev','kratky_nazev','ulice','mesto','psc','stat','je_zs','je_ss','poznamka']) |
||||
|
|
||||
|
def check_resitel(): |
||||
|
old_query = 'SELECT * FROM seminar_resitele ORDER BY id' |
||||
|
new_query = '''SELECT seminar_resitele.id, skola_id, rok_maturity, zasilat, seminar_resitele.poznamka, |
||||
|
o.jmeno AS jmeno, o.prijmeni AS prijmeni, o.user_id AS user_id, o.pohlavi_muz AS pohlavi_muz, o.email AS email, o.telefon AS telefon, o.datum_narozeni AS datum_narozeni, |
||||
|
o.datum_souhlasu_udaje AS datum_souhlasu_udaje, o.datum_souhlasu_zasilani AS datum_souhlasu_zasilani, o.datum_registrace AS datum_prihlaseni, o.ulice AS ulice, o.mesto AS mesto, o.psc AS psc, o.stat AS stat |
||||
|
FROM seminar_resitele JOIN seminar_osoby AS o ON seminar_resitele.osoba_id = o.id ORDER BY seminar_resitele.id''' |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query,new_query) |
||||
|
|
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
fields_osoba = [ |
||||
|
'jmeno', |
||||
|
'prijmeni', |
||||
|
'user_id', |
||||
|
'pohlavi_muz', |
||||
|
#'email', #vyreseno separatne |
||||
|
'telefon', |
||||
|
'datum_narozeni', |
||||
|
'datum_souhlasu_udaje', |
||||
|
'datum_souhlasu_zasilani', |
||||
|
'datum_prihlaseni', |
||||
|
'ulice', |
||||
|
'mesto', |
||||
|
'psc', |
||||
|
'stat', |
||||
|
] |
||||
|
fields_keep = [ |
||||
|
'id', |
||||
|
'skola_id', |
||||
|
'rok_maturity', |
||||
|
'zasilat', |
||||
|
'poznamka', |
||||
|
] |
||||
|
fields = fields_keep+fields_osoba |
||||
|
for o,n in res: |
||||
|
check_same(o,n,fields) |
||||
|
if o['email'] != n['email'] and o['email'] != '': |
||||
|
print(f"WARNING: Emails differ: old: {o['email']}, new: {n['email']}") |
||||
|
|
||||
|
def check_reseni(): |
||||
|
# Migrace 0058 zamerne meni (zmensuje) pocet reseni, aby kazdy clanek mel |
||||
|
# jen jedno reseni (s vice resiteli, coz postaru neslo) |
||||
|
# Kvuli tomu je potreba kontrolovat dve veci: |
||||
|
# 1) Ze kazdy resitel dostal za kazdy problem spravne bodu |
||||
|
# 2) Ze detaily reseni zustaly zachovany |
||||
|
|
||||
|
# Cast 1) |
||||
|
old_query = 'SELECT * FROM seminar_reseni ORDER BY problem_id, resitel_id, body, timestamp' |
||||
|
new_query = '''SELECT seminar_reseni.id, forma, seminar_reseni.poznamka, cas_doruceni, hodnoceni.problem_id AS problem_id, hodnoceni.body AS body, hodnoceni.cislo_body_id AS cislo_body_id, res.id AS resitel_id |
||||
|
FROM seminar_reseni |
||||
|
JOIN seminar_hodnoceni AS hodnoceni ON seminar_reseni.id = hodnoceni.reseni_id |
||||
|
JOIN seminar_reseni_resitele AS rr ON seminar_reseni.id = rr.reseni_id |
||||
|
JOIN seminar_resitele AS res ON res.id = rr.resitele_id |
||||
|
ORDER BY problem_id, resitel_id, body, cas_doruceni''' |
||||
|
|
||||
|
# Po spojeni nekterych problemu se lisi casy doruceni a poznamky, proto je nebudeme kontrolovat (jde v podstate o triviality, tak je to snad jedno) |
||||
|
same_fields = ['forma', 'problem_id', 'body', 'cislo_body_id', 'resitel_id'] |
||||
|
renamed_fields = [ |
||||
|
#('timestamp', 'cas_doruceni'), |
||||
|
] |
||||
|
old_fields = same_fields + [f[0] for f in renamed_fields] |
||||
|
new_fields = same_fields + [f[1] for f in renamed_fields] |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query, new_query) |
||||
|
|
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,old_fields, new_fields) |
||||
|
|
||||
|
# Cast 2) |
||||
|
# Query se lisi tim, ze uz nejoinujeme resitele. |
||||
|
old_query = 'SELECT * FROM seminar_reseni ORDER BY id' |
||||
|
new_query = '''SELECT seminar_reseni.id, forma, poznamka, cas_doruceni AS timestamp, h.problem_id AS problem_id, h.body AS body, h.cislo_body_id AS cislo_body_id |
||||
|
FROM seminar_reseni |
||||
|
JOIN seminar_hodnoceni AS h ON h.reseni_id = seminar_reseni.id |
||||
|
ORDER BY id''' |
||||
|
|
||||
|
# execute_simple kontroluje stejnost poctu radku, to nechceme. |
||||
|
oldcur.execute(old_query) |
||||
|
newcur.execute(new_query) |
||||
|
old_res, new_res = oldcur.fetchall(), newcur.fetchall() |
||||
|
# Zkontrolujeme, ze pro kazde nove reseni ma stare reseni spravna data. |
||||
|
new_ids = [n['id'] for n in new_res] |
||||
|
spravna_old = list(filter(lambda o: o['id'] in new_ids, old_res)) |
||||
|
res = zip(spravna_old,new_res) |
||||
|
for o,n in res: |
||||
|
# Tady by se poznamky i timestampy mely zachovat |
||||
|
# Z nejakeho duvodu se ale poznamky lisi ve whitespace, tak je zkontrolujeme separatne |
||||
|
check_same(o,n,['id', 'forma', 'timestamp', 'problem_id', 'body', 'cislo_body_id']) |
||||
|
old_pozn = o['poznamka'].strip() |
||||
|
new_pozn = n['poznamka'].strip() |
||||
|
if old_pozn != new_pozn: |
||||
|
raise ValueError('Poznamky se lisi pro radky {dict(o)} a {dict(n)}') |
||||
|
|
||||
|
|
||||
|
|
||||
|
def check_organizator(): |
||||
|
old_query = 'SELECT * FROM seminar_organizator ORDER BY id' |
||||
|
new_query = '''SELECT seminar_organizator.id AS id, studuje, strucny_popis_organizatora, users.id AS uid, osoba.prezdivka AS o_prezdivka, osoba.foto AS o_foto, organizuje_od, organizuje_do |
||||
|
FROM seminar_organizator |
||||
|
JOIN seminar_osoby AS osoba ON osoba_id = osoba.id |
||||
|
JOIN auth_user AS users ON osoba.user_id = users.id |
||||
|
ORDER BY seminar_organizator.id''' |
||||
|
|
||||
|
same_fields = ['studuje', 'strucny_popis_organizatora'] |
||||
|
renamed_fields = [ |
||||
|
('user_id', 'uid'), |
||||
|
#('prezdivka', 'o_prezdivka'), |
||||
|
('foto', 'o_foto'), |
||||
|
] |
||||
|
old_fields = same_fields + [f[0] for f in renamed_fields] |
||||
|
new_fields = same_fields + [f[1] for f in renamed_fields] |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query,new_query) |
||||
|
res = zip(old_res, new_res) |
||||
|
for o,n in res: |
||||
|
check_same(o,n,old_fields, new_fields) |
||||
|
# organizuje od, do: |
||||
|
# Migrace prirazuje aktualni casovou zonu, takze chceme tady rucne vynutit CET. |
||||
|
from datetime import timedelta, timezone |
||||
|
cet = timezone(timedelta(hours=1)) |
||||
|
if o['organizuje_od_roku'] is None and n['organizuje_od'] is None: |
||||
|
pass |
||||
|
elif o['organizuje_od_roku'] != n['organizuje_od'].astimezone(cet).year: |
||||
|
raise ValueError(f'Not matching organizuje_od for org id={o["id"]}: old {o["organizuje_od_roku"]}, new {n["organizuje_od"]}') |
||||
|
if o['organizuje_do_roku'] is None and n['organizuje_do'] is None: |
||||
|
pass |
||||
|
elif o['organizuje_do_roku'] != n['organizuje_do'].astimezone(cet).year: |
||||
|
raise ValueError(f'Not matching organizuje_do for org id={o["id"]}: old {o["organizuje_do_roku"]}, new {n["organizuje_do"]}') |
||||
|
if o['prezdivka'] == n['o_prezdivka']: |
||||
|
continue |
||||
|
if o['prezdivka'] is None and n['o_prezdivka'] == '': |
||||
|
continue |
||||
|
raise ValueError(f'Not matching prezdivka for org id={o["id"]}: old {o["prezdivka"]}, new {n["o_prezdivka"]}') |
||||
|
|
||||
|
|
||||
|
def check_rocnik(): |
||||
|
old_query = "SELECT * FROM seminar_rocniky ORDER BY id" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,['id','prvni_rok', 'rocnik', 'exportovat']) |
||||
|
|
||||
|
def check_cislo(): |
||||
|
old_query = "SELECT * FROM seminar_cisla ORDER BY id" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n, ['id','rocnik_id','cislo', 'datum_vydani','datum_deadline','verejne','poznamka','pdf'], |
||||
|
['id','rocnik_id','poradi','datum_vydani','datum_deadline','verejne','poznamka','pdf']) |
||||
|
|
||||
|
def check_priloha_reseni(): |
||||
|
old_query = "SELECT * FROM seminar_priloha_reseni" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n, ['id','reseni_id', 'timestamp', 'soubor', 'poznamka'], |
||||
|
['id','reseni_id', 'vytvoreno', 'soubor', 'poznamka']) |
||||
|
|
||||
|
def check_soustredeni(): |
||||
|
old_query = "SELECT * FROM seminar_soustredeni ORDER BY id" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,['id','rocnik_id','datum_zacatku','datum_konce','verejne','misto','text','typ','exportovat']) |
||||
|
#Kontrola ucasnici, organizatori v samostatnych funkcich |
||||
|
|
||||
|
def check_soustredeni_ucastnici(): |
||||
|
old_query = "SELECT * FROM seminar_soustredeni_ucastnici ORDER BY id" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,['id','resitel_id','soustredeni_id','poznamka']) |
||||
|
|
||||
|
def check_soustredeni_organizatori(): |
||||
|
old_query = "SELECT * FROM seminar_soustredeni_organizatori ORDER BY id" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,['id','organizator_id','soustredeni_id','poznamka']) |
||||
|
|
||||
|
def check_nastaveni(): |
||||
|
old_query = "SELECT * FROM seminar_nastaveni ORDER BY id" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,['id','aktualni_cislo_id']) |
||||
|
|
||||
|
def check_novinky(): |
||||
|
old_query = "SELECT * FROM seminar_novinky ORDER BY id" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,['id','datum','text','obrazek','zverejneno']) |
||||
|
if get_user_id_for_org_id(n['autor_id']) != o['autor_id']: |
||||
|
raise ValueError("Nesedi autori u novinek") |
||||
|
|
||||
|
def check_pohadka(): |
||||
|
old_query = "SELECT * FROM seminar_pohadky ORDER BY id" |
||||
|
new_query = """SELECT sp.id AS id, sp.autor_id AS autor_id, sp.vytvoreno AS vytvoreno, snp.treenode_ptr_id AS treenode_ptr_id, st.na_web AS text, |
||||
|
zn_pred.uloha_id AS uloha_pred, zn_po.uloha_id AS uloha_po |
||||
|
FROM seminar_pohadky AS sp |
||||
|
-- Text pohádky |
||||
|
INNER JOIN seminar_nodes_pohadka AS snp ON sp.id = snp.pohadka_id |
||||
|
INNER JOIN seminar_nodes_treenode AS snt ON snt.id = snp.treenode_ptr_id |
||||
|
INNER JOIN seminar_nodes_obsah AS sno ON sno.treenode_ptr_id = snt.first_child_id |
||||
|
INNER JOIN seminar_texty AS st ON sno.text_id = st.id |
||||
|
-- Predchozí úloha |
||||
|
LEFT OUTER JOIN seminar_nodes_treenode AS ztn_pred ON ztn_pred.succ_id = snt.id |
||||
|
LEFT OUTER JOIN seminar_nodes_uloha_zadani AS zn_pred ON zn_pred.treenode_ptr_id = ztn_pred.id |
||||
|
-- Následující úloha |
||||
|
LEFT OUTER JOIN seminar_nodes_uloha_zadani AS zn_po ON zn_po.treenode_ptr_id = snt.succ_id |
||||
|
|
||||
|
ORDER BY sp.id""" |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query,new_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n,['id','timestamp','text'],['id','vytvoreno','text']) |
||||
|
if o['autor_id'] is not None: |
||||
|
if get_user_id_for_org_id(n['autor_id']) != o['autor_id']: |
||||
|
raise ValueError("Nesedi autori u pohadky") |
||||
|
# Správné úlohy |
||||
|
# NOTE: o['pred'] rika, zda je pohadka pred ulohou, nikoliv zda je relevantni uloha pred pohadkou! |
||||
|
spravny_klic = 'uloha_po' if o['pred'] else 'uloha_pred' |
||||
|
if o['uloha_id'] != n[spravny_klic]: |
||||
|
raise ValueError(f"Pohádka přidružená ke špatné úloze! old: {o['uloha_id']}, new: {n[spravny_klic]}, pozice: {spravny_klic}") |
||||
|
|
||||
|
|
||||
|
# Problémy jsou rozdělené podle typů: |
||||
|
def check_problem_common(): |
||||
|
old_query = "SELECT id, nazev, stav, kod, autor_id, text_org, timestamp, typ FROM seminar_problemy ORDER BY id" |
||||
|
new_query = """SELECT sp.id AS id, sp.nazev AS nazev, sp.stav AS stav, sp.kod AS kod, au.id AS autor_id, sp.poznamka AS poznamka, sp.vytvoreno AS vytvoreno |
||||
|
FROM seminar_problemy AS sp |
||||
|
LEFT OUTER JOIN seminar_organizator AS so ON sp.autor_id = so.id |
||||
|
LEFT OUTER JOIN seminar_osoby AS sos ON so.osoba_id = sos.id |
||||
|
LEFT OUTER JOIN auth_user AS au ON sos.user_id = au.id |
||||
|
ORDER BY sp.id""" |
||||
|
|
||||
|
same_fields = ['id', 'nazev', 'stav', 'autor_id', 'kod'] |
||||
|
renamed_fields = [ |
||||
|
('text_org', 'poznamka'), |
||||
|
('timestamp', 'vytvoreno'), |
||||
|
] |
||||
|
old_fields = same_fields + [f[0] for f in renamed_fields] |
||||
|
new_fields = same_fields + [f[1] for f in renamed_fields] |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query,new_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n, old_fields, new_fields) |
||||
|
|
||||
|
# Opravovatelé |
||||
|
# Po staru byli opravovatele organizatori, takze je potreba je dohledat. |
||||
|
old_query = """SELECT seminar_problemy.id, org.id AS opravovatel_id FROM seminar_problemy |
||||
|
JOIN seminar_organizator AS org ON seminar_problemy.opravovatel_id = org.user_id;""" |
||||
|
new_query = "SELECT problem_id, organizator_id FROM seminar_problemy_opravovatele" |
||||
|
|
||||
|
# Simple cursors |
||||
|
#oldcur = oldconn.cursor() |
||||
|
oldcur.execute(old_query) |
||||
|
old_results = oldcur.fetchall() |
||||
|
#newcur = newconn.cursor() |
||||
|
newcur.execute(new_query) |
||||
|
new_results = newcur.fetchall() |
||||
|
|
||||
|
for oldr in old_results: |
||||
|
if oldr not in new_results: |
||||
|
raise ValueError(f'Opravovatel pair {oldr} not found in new db.') |
||||
|
|
||||
|
# Zaměření se vyřeší okometricky (#1186) |
||||
|
|
||||
|
|
||||
|
def check_uloha(): |
||||
|
old_query = "SELECT * FROM seminar_problemy WHERE typ = 'uloha' ORDER BY id" |
||||
|
new_query = """SELECT cislo_zadani_id, cislo_reseni_id, problem_ptr_id, max_body, COALESCE(uzt.na_web, '') AS text_zadani, COALESCE(uvt.na_web, '') AS text_reseni, cislo_deadline_id |
||||
|
FROM seminar_ulohy |
||||
|
-- Problém: |
||||
|
JOIN seminar_problemy AS problem ON problem_ptr_id = problem.id |
||||
|
-- Text zadání: |
||||
|
-- ZadaniNode a VzorakNode maji existovat vzdy, ale obsah nemusi (pokud ho nemaji) |
||||
|
INNER JOIN seminar_nodes_uloha_zadani AS uzn ON problem.id = uzn.uloha_id |
||||
|
INNER JOIN seminar_nodes_treenode AS uztn ON uztn.id = uzn.treenode_ptr_id |
||||
|
LEFT OUTER JOIN seminar_nodes_obsah AS uzo ON uzo.treenode_ptr_id = uztn.first_child_id |
||||
|
LEFT OUTER JOIN seminar_texty AS uzt ON uzo.text_id = uzt.id |
||||
|
-- Text vzoráku: |
||||
|
INNER JOIN seminar_nodes_uloha_vzorak AS uvn ON problem.id = uvn.uloha_id |
||||
|
INNER JOIN seminar_nodes_treenode AS uvtn ON uvtn.id = uvn.treenode_ptr_id |
||||
|
LEFT OUTER JOIN seminar_nodes_obsah AS uvo ON uvo.treenode_ptr_id = uvtn.first_child_id |
||||
|
LEFT OUTER JOIN seminar_texty AS uvt ON uvo.text_id = uvt.id |
||||
|
|
||||
|
ORDER BY problem_ptr_id""" |
||||
|
|
||||
|
same_fields = ['cislo_zadani_id', 'cislo_reseni_id', 'text_zadani', 'text_reseni'] |
||||
|
renamed_fields = [ |
||||
|
('id', 'problem_ptr_id'), |
||||
|
('body', 'max_body'), |
||||
|
] |
||||
|
old_fields = same_fields + [f[0] for f in renamed_fields] |
||||
|
new_fields = same_fields + [f[1] for f in renamed_fields] |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query, new_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n, old_fields, new_fields) |
||||
|
# Datum deadline vypadá prázdně, tak to budeme předpokládat. |
||||
|
if n['cislo_deadline_id'] is not None: |
||||
|
raise ValueError("Úloha má deadline.") |
||||
|
|
||||
|
def check_tema(): |
||||
|
old_query = """SELECT text_zadani, text_reseni, typ, c.rocnik_id AS rocnik_id |
||||
|
FROM seminar_problemy |
||||
|
LEFT OUTER JOIN seminar_cisla AS c ON c.id = cislo_zadani_id |
||||
|
WHERE typ IN ('tema', 'serial') |
||||
|
ORDER BY seminar_problemy.id""" |
||||
|
new_query = """SELECT tema_typ, COALESCE(zad_text.na_web, '') AS text_zadani, COALESCE(res_text.na_web, '') AS text_reseni, rn.rocnik_id AS rocnik_id |
||||
|
FROM seminar_temata |
||||
|
-- Problém: |
||||
|
JOIN seminar_problemy AS problem ON problem_ptr_id = problem.id |
||||
|
-- Text: |
||||
|
-- TvCNode má dva potomky, oba TextNode. První drží původní text zadání, druhý řešení. |
||||
|
INNER JOIN seminar_nodes_temavcisle AS tvcn ON tvcn.tema_id = id |
||||
|
INNER JOIN seminar_nodes_treenode AS ttn ON tvcn.treenode_ptr_id = ttn.id |
||||
|
LEFT OUTER JOIN seminar_nodes_treenode AS zad_tn ON ttn.first_child_id = zad_tn.id -- jen 33 z nich ma zadani |
||||
|
LEFT OUTER JOIN seminar_nodes_treenode AS res_tn ON zad_tn.succ_id = res_tn.id -- jen 4 z nich ma reseni |
||||
|
LEFT OUTER JOIN seminar_nodes_obsah AS zad_on ON zad_on.treenode_ptr_id = zad_tn.id |
||||
|
LEFT OUTER JOIN seminar_nodes_obsah AS res_on ON res_on.treenode_ptr_id = res_tn.id |
||||
|
LEFT OUTER JOIN seminar_texty AS zad_text ON zad_on.text_id = zad_text.id |
||||
|
LEFT OUTER JOIN seminar_texty AS res_text ON res_on.text_id = res_text.id -- vsechny 4 |
||||
|
-- Ročník tématu: |
||||
|
-- Podle rootu TvCN |
||||
|
LEFT OUTER JOIN seminar_nodes_rocnik AS rn ON ttn.root_id = rn.treenode_ptr_id |
||||
|
|
||||
|
ORDER BY problem_ptr_id""" |
||||
|
same_fields = ['text_zadani', 'text_reseni', 'rocnik_id'] |
||||
|
renamed_fields = [ |
||||
|
('typ', 'tema_typ'), |
||||
|
] |
||||
|
old_fields = same_fields + [f[0] for f in renamed_fields] |
||||
|
new_fields = same_fields + [f[1] for f in renamed_fields] |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query, new_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
check_same(o,n, old_fields, new_fields) |
||||
|
|
||||
|
def check_konfera(): |
||||
|
old_query = "SELECT * FROM seminar_problemy WHERE typ = 'konfera'" |
||||
|
new_query = "SELECT * FROM seminar_konfera" |
||||
|
|
||||
|
oldcur.execute(old_query) |
||||
|
newcur.execute(new_query) |
||||
|
|
||||
|
if oldcur.rowcount != 0 or newcur.rowcount != 0: |
||||
|
raise ValueError('There exists a Konfera!') |
||||
|
|
||||
|
def check_org_clanek(): |
||||
|
old_query = "SELECT * FROM seminar_problemy WHERE typ = 'org-clanek'" |
||||
|
|
||||
|
oldcur.execute(old_query) |
||||
|
|
||||
|
if oldcur.rowcount != 0: |
||||
|
raise ValueError('There exists a Org-clanek!') |
||||
|
|
||||
|
def check_res_clanek(): |
||||
|
# Dva(!) články mají text (zadání), který se má zachovat. |
||||
|
old_query = "SELECT * FROM seminar_problemy WHERE typ = 'res-clanek' ORDER BY id" |
||||
|
new_query = """SELECT cislo_id, text.na_web AS text_zadani |
||||
|
FROM seminar_clanky |
||||
|
JOIN seminar_problemy AS problem ON problem_ptr_id = problem.id |
||||
|
INNER JOIN seminar_hodnoceni AS hodn ON problem.id = hodn.problem_id |
||||
|
INNER JOIN seminar_reseni AS rese ON rese.id = hodn.reseni_id |
||||
|
INNER JOIN seminar_nodes_otistene_reseni AS rn ON rese.text_cely_id = rn.treenode_ptr_id -- Tenhle radek neni potreba, ale ujistuje se mj. o spravnem typu TreeNode. |
||||
|
INNER JOIN seminar_nodes_treenode AS tn ON rn.treenode_ptr_id = tn.id |
||||
|
-- Nektere clanky vubec nemely text, tak jim migr 0058 nevyrobila dalsi treenody |
||||
|
LEFT OUTER JOIN seminar_nodes_obsah AS son ON son.treenode_ptr_id = tn.first_child_id |
||||
|
LEFT OUTER JOIN seminar_texty AS text ON text.id = son.text_id |
||||
|
|
||||
|
ORDER BY problem_ptr_id""" |
||||
|
same_fields = ['text_zadani'] |
||||
|
renamed_fields = [ |
||||
|
('cislo_zadani_id', 'cislo_id'), |
||||
|
] |
||||
|
old_fields = same_fields + [f[0] for f in renamed_fields] |
||||
|
new_fields = same_fields + [f[1] for f in renamed_fields] |
||||
|
|
||||
|
old_res, new_res = execute_simple(old_query, new_query) |
||||
|
res = zip(old_res,new_res) |
||||
|
|
||||
|
for o,n in res: |
||||
|
# text_zadani po novu mohl byt None |
||||
|
if n['text_zadani'] is None: |
||||
|
n['text_zadani'] = '' |
||||
|
check_same(o,n, old_fields, new_fields) |
||||
|
assert(o['text_reseni'] == '') |
||||
|
|
||||
|
def check_untyped_problem(): |
||||
|
old_query = "SELECT * FROM seminar_problemy WHERE typ NOT IN ('uloha', 'tema', 'serial', 'konfera', 'org-clanek', 'res-clanek')" |
||||
|
|
||||
|
oldcur.execute(old_query) |
||||
|
|
||||
|
if oldcur.rowcount != 0: |
||||
|
raise ValueError('There exists a Problem without type!') |
||||
|
|
||||
|
|
||||
|
|
||||
|
check_skola() |
||||
|
check_resitel() |
||||
|
check_reseni() |
||||
|
check_organizator() |
||||
|
check_rocnik() |
||||
|
check_cislo() |
||||
|
check_priloha_reseni() |
||||
|
check_soustredeni() |
||||
|
check_soustredeni_ucastnici() |
||||
|
check_soustredeni_organizatori() |
||||
|
check_nastaveni() |
||||
|
check_novinky() |
||||
|
check_pohadka() |
||||
|
|
||||
|
check_problem_common() |
||||
|
check_uloha() |
||||
|
check_tema() |
||||
|
check_konfera() |
||||
|
check_org_clanek() |
||||
|
check_res_clanek() |
||||
|
check_untyped_problem() |
@ -0,0 +1,3 @@ |
|||||
|
Tahle slozka obsahuje vsechny detaily a popisy, jak nasadit "druhou verzi" M&M webu. |
||||
|
|
||||
|
TODO: chybi tu popis na zprovozneni flatpages, na loaddata &c. |
@ -0,0 +1,22 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
set -u |
||||
|
|
||||
|
deactivate || true |
||||
|
|
||||
|
cd /akce/mam/www/mamweb-test/ |
||||
|
make sync_test |
||||
|
systemctl --user stop mamweb-test.service |
||||
|
rm -rvf env |
||||
|
make install_venv |
||||
|
. env/bin/activate |
||||
|
make install |
||||
|
deploy_v2/pre_migration.py |
||||
|
make deploy_test |
||||
|
./manage.py load_org_permissions admin_org_prava.json |
||||
|
./manage.py loaddata data/* |
||||
|
systemctl --user start mamweb-test.service |
||||
|
./manage.py generate_thumbnails |
||||
|
|
||||
|
echo 'Et voilá!' |
||||
|
echo 'Nezapomeň opravit práva pro sitetree!' |
@ -0,0 +1,3 @@ |
|||||
|
Jsou špatně práva k sitetree (protože se používají primární klíče, které jsou jiné :-() |
||||
|
Špatné položky se dají najít pomocí následujícího příkazu: |
||||
|
grep -E 'access_permissions": \[$' data/sitetree.json -A17 | grep -E 'acc|tit' -A2 |
@ -0,0 +1,42 @@ |
|||||
|
#!/usr/bin/env python3 |
||||
|
|
||||
|
import os |
||||
|
import sys |
||||
|
|
||||
|
import django |
||||
|
|
||||
|
#### Inicializace Djanga |
||||
|
sys.path.append(os.path.dirname(os.path.realpath(__file__))+'/..') |
||||
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mamweb.settings') |
||||
|
django.setup() |
||||
|
|
||||
|
## Pozor, nejde pouzit ORM, protoze kod je na jine verzi nez databaze a nejde namigrovat. |
||||
|
from django.db import connection |
||||
|
|
||||
|
|
||||
|
def smaz_zle_clanky(): |
||||
|
# Tyhle clanky vubec nejsou clanky, bude potreba je udelat cele jinak a spravne. |
||||
|
#m.Problem.objects.filter(id__in=[1981, 1970, 2222]).delete() |
||||
|
## with connection.cursor() as cursor: |
||||
|
## # Nejdriv musime smazat reseni: |
||||
|
## cursor.execute('DELETE FROM seminar_reseni WHERE problem_id IN (1981, 1970, 2222);') |
||||
|
## # Nakonec i ty clanky samotne |
||||
|
## cursor.execute('DELETE FROM seminar_problemy WHERE id IN (1981, 1970, 2222);') |
||||
|
|
||||
|
# Update: stejně je v DB bordel, tak z nich prostě jen udělám témata a všechno zhruba přežije… |
||||
|
with connection.cursor() as cursor: |
||||
|
cursor.execute("UPDATE seminar_problemy SET typ = 'tema' WHERE id IN (1981, 1970, 2222);") |
||||
|
|
||||
|
def smaz_divne_uzivatele(): |
||||
|
# U techto uzivatelu neexistuje Organizator s nimi spojeny |
||||
|
# Takze pak delaji akorat neporadek |
||||
|
with connection.cursor() as cursor: |
||||
|
# Jeste je potreba zrusit vazby |
||||
|
cursor.execute('UPDATE django_comments SET user_id = NULL WHERE user_id = 34;') |
||||
|
cursor.execute('UPDATE seminar_problemy SET autor_id = NULL WHERE autor_id = 34;') |
||||
|
cursor.execute('DELETE FROM django_admin_log WHERE user_id = 34;') |
||||
|
cursor.execute('DELETE FROM auth_user_groups WHERE user_id = 34;') |
||||
|
cursor.execute('DELETE FROM auth_user WHERE id IN (34, 40, 30, 50, 54, 58, 43);') |
||||
|
|
||||
|
smaz_zle_clanky() |
||||
|
smaz_divne_uzivatele() |
@ -0,0 +1,12 @@ |
|||||
|
#!/usr/bin/python3 |
||||
|
|
||||
|
import json |
||||
|
import argparse |
||||
|
|
||||
|
parser = argparse.ArgumentParser() |
||||
|
parser.add_argument("input", type=argparse.FileType('r', encoding='utf-8')) |
||||
|
parser.add_argument('output', type=argparse.FileType('w', encoding='utf-8')) |
||||
|
args = parser.parse_args() |
||||
|
|
||||
|
data = json.load(args.input) |
||||
|
json.dump(data, args.output, ensure_ascii=False, sort_keys=True, indent='\t') |
@ -1,11 +1,9 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
|
|
||||
from __future__ import unicode_literals |
|
||||
|
|
||||
from autocomplete_light import shortcuts as autocomplete_light |
from autocomplete_light import shortcuts as autocomplete_light |
||||
|
|
||||
from models import Obrazek, Galerie |
from .models import Obrazek, Galerie |
||||
from views import cesta_od_korene |
from .views import cesta_od_korene |
||||
|
|
||||
|
|
||||
class ObrazekAutocomplete(autocomplete_light.AutocompleteModelBase): |
class ObrazekAutocomplete(autocomplete_light.AutocompleteModelBase): |
@ -0,0 +1,71 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.20 on 2019-04-30 21:40 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import galerie.models |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('galerie', '0007_obrazek_odstranen_datum'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name='galerie', |
||||
|
name='datum_vytvoreni', |
||||
|
field=models.DateTimeField(auto_now_add=True, verbose_name='Datum vytvoření'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='galerie', |
||||
|
name='datum_zmeny', |
||||
|
field=models.DateTimeField(auto_now=True, verbose_name='Datum poslední změny'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='galerie', |
||||
|
name='nazev', |
||||
|
field=models.CharField(max_length=100, verbose_name='Název'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='galerie', |
||||
|
name='popis', |
||||
|
field=models.TextField(blank=True, null=True, verbose_name='Popis'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='galerie', |
||||
|
name='poradi', |
||||
|
field=models.IntegerField(blank=True, null=True, verbose_name='Pořadí'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='galerie', |
||||
|
name='zobrazit', |
||||
|
field=models.IntegerField(choices=[(0, 'Vždy'), (1, 'Organizátorům'), (2, 'Nikdy')], default=1, verbose_name='Zobrazit?'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='obrazek', |
||||
|
name='datum_vlozeni', |
||||
|
field=models.DateTimeField(auto_now_add=True, verbose_name='Datum vložení'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='obrazek', |
||||
|
name='nazev', |
||||
|
field=models.CharField(blank=True, max_length=50, null=True, verbose_name='Název'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='obrazek', |
||||
|
name='obrazek_velky', |
||||
|
field=models.ImageField(help_text='Lze vložit libovolně velký obrázek. Ideální je, aby alespoň jeden rozměr měl alespoň 500px.', upload_to=galerie.models.obrazek_filename), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='obrazek', |
||||
|
name='popis', |
||||
|
field=models.TextField(blank=True, null=True, verbose_name='Popis'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='obrazek', |
||||
|
name='poradi', |
||||
|
field=models.IntegerField(blank=True, null=True, verbose_name='Pořadí'), |
||||
|
), |
||||
|
] |
@ -0,0 +1,31 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.21 on 2019-06-10 21:58 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('galerie', '0008_auto_20190430_2340'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name='galerie', |
||||
|
name='galerie_up', |
||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='galerie.Galerie'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='galerie', |
||||
|
name='soustredeni', |
||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='seminar.Soustredeni'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='obrazek', |
||||
|
name='galerie', |
||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='galerie.Galerie'), |
||||
|
), |
||||
|
] |
Before Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 2.0 KiB |
@ -1,6 +0,0 @@ |
|||||
{% extends "base.html" %} |
|
||||
|
|
||||
{# TODO predelat pres context processor #} |
|
||||
{% block header %}soustredeni{% endblock %} |
|
||||
{% block menu_soustredeni %}selected{% endblock %} |
|
||||
{% block submenu %}{% include 'seminar/soustredeni/submenu.html' %}{% endblock %} |
|
@ -1,13 +1,14 @@ |
|||||
# coding: utf-8 |
# coding: utf-8 |
||||
|
|
||||
from django.conf.urls import include, url |
from django.urls import path |
||||
|
from seminar.utils import org_required |
||||
from . import views |
from . import views |
||||
|
|
||||
urlpatterns = [ |
urlpatterns = [ |
||||
url(r'^(?P<pk>\d+)/$', views.nahled), |
path('<int:pk>/', views.nahled), |
||||
url(r'^(?P<pk>\d+)/(?P<fotka>\d+)/$', views.detail), |
path('<int:pk>/<int:fotka>/', views.detail), |
||||
url(r'^(?P<galerie>\d+)/new/$', views.new_galerie), |
path('<int:galerie>/new/', org_required(views.new_galerie)), |
||||
url(r'^(?P<galerie>\d+)/plus/(?P<subgalerie>\d+)/$', views.plus_galerie), |
path('<int:galerie>/plus/<int:subgalerie>/', org_required(views.plus_galerie)), |
||||
url(r'^(?P<galerie>\d+)/minus/(?P<subgalerie>\d+)/$', views.minus_galerie), |
path('<int:galerie>/minus/<int:subgalerie>/', org_required(views.minus_galerie)), |
||||
] |
] |
||||
|
|
||||
|
@ -0,0 +1,10 @@ |
|||||
|
from django.contrib import admin |
||||
|
from django.contrib.admin import ModelAdmin |
||||
|
import header_fotky.models as m |
||||
|
|
||||
|
|
||||
|
class FotkaPozadiAdmin(ModelAdmin): |
||||
|
readonly_fields = ['cas'] |
||||
|
|
||||
|
admin.site.register(m.FotkaHeader, FotkaPozadiAdmin) |
||||
|
admin.site.register(m.FotkaUrlVazba) |
@ -0,0 +1,5 @@ |
|||||
|
from django.apps import AppConfig |
||||
|
|
||||
|
|
||||
|
class HeaderFotkyConfig(AppConfig): |
||||
|
name = 'header_fotky' |
@ -0,0 +1,45 @@ |
|||||
|
|
||||
|
from datetime import datetime, date |
||||
|
import random |
||||
|
|
||||
|
from django.conf import settings |
||||
|
|
||||
|
from header_fotky.models import FotkaUrlVazba |
||||
|
|
||||
|
|
||||
|
def vzhled(request): |
||||
|
''' Podle casu prida do templatu, zdali je nebo neni noc ''' |
||||
|
hodin = datetime.now().hour |
||||
|
if (hodin <= 6) or (hodin >= 20): |
||||
|
noc = True |
||||
|
nedoba = 'den' |
||||
|
doba = 'noc' |
||||
|
else: |
||||
|
noc = False |
||||
|
nedoba = 'noc' |
||||
|
doba = 'den' |
||||
|
url = request.path |
||||
|
|
||||
|
fotky = FotkaUrlVazba.objects.exclude(denni_doba=nedoba) |
||||
|
fotka = None |
||||
|
|
||||
|
# TODO rychlejší patternmatch? |
||||
|
while (fotka is None) and (url != ''): |
||||
|
presne = fotky.filter(url__exact=url) |
||||
|
if presne.count() > 0: |
||||
|
presne_doba = presne.filter(denni_doba=doba) |
||||
|
if presne_doba.count() > 0: |
||||
|
fotka = random.choice(presne_doba).url_fotky() |
||||
|
else: |
||||
|
fotka = random.choice(presne).url_fotky() |
||||
|
|
||||
|
url = url[:-1] |
||||
|
index = url.rfind('/') |
||||
|
if index != -1: |
||||
|
url = url[:index+1] |
||||
|
|
||||
|
if fotka is None: |
||||
|
fotka = settings.STATIC_URL + "images/header/vikendovka.jpg" |
||||
|
|
||||
|
return {'noc': noc, 'fotka': fotka} |
||||
|
|
@ -0,0 +1,63 @@ |
|||||
|
# Generated by Django 2.2.15 on 2020-09-20 09:14 |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
import django.utils.timezone |
||||
|
|
||||
|
from shutil import copytree |
||||
|
|
||||
|
|
||||
|
def zkopiruj_fotky(apps, schema_editor): |
||||
|
try: |
||||
|
copytree("mamweb/static/images/header/", "media/header/") # FIXME: bylo tu dirs_exists_ok=True, nekompatibilní s Py 3.7 |
||||
|
except FileExistsError: |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
initial = True |
||||
|
|
||||
|
dependencies = [ |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.CreateModel( |
||||
|
name='FotkaHeader', |
||||
|
fields=[ |
||||
|
('cas', models.DateTimeField(default=django.utils.timezone.now, help_text='Čas vložení fotky', |
||||
|
verbose_name='čas vložení fotky')), |
||||
|
('nazev', |
||||
|
models.CharField(help_text='Název např. archiv_noc', max_length=50, primary_key=True, serialize=False, |
||||
|
unique=True, verbose_name='název fotky')), |
||||
|
('fotka', models.ImageField(upload_to='header')), |
||||
|
], |
||||
|
options={ |
||||
|
'verbose_name': 'fotka do pozadí menu', |
||||
|
'verbose_name_plural': 'fotky do pozadí menu', |
||||
|
'db_table': 'fotky_header', |
||||
|
'ordering': ['-cas'], |
||||
|
}, |
||||
|
), |
||||
|
migrations.CreateModel( |
||||
|
name='FotkaUrlVazba', |
||||
|
fields=[ |
||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
||||
|
('url', |
||||
|
models.CharField(blank=True, help_text='url prefix stránek např: /archiv/ nebo /', max_length=100, |
||||
|
verbose_name='URL')), |
||||
|
('denni_doba', models.CharField(choices=[('den', 'Zobrazit jen ve dne'), ('noc', 'Zobrazit jen v noci'), |
||||
|
('oboji', 'Zobrazovat pořád')], default='oboji', max_length=16, |
||||
|
verbose_name='denní doba')), |
||||
|
('fotka', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='header_fotky.FotkaHeader', |
||||
|
verbose_name='fotka')), |
||||
|
], |
||||
|
options={ |
||||
|
'verbose_name': 'vazba url a fotky do pozadí menu', |
||||
|
'verbose_name_plural': 'vazby url a fotek do pozadí menu', |
||||
|
'db_table': 'fotky_url_vazby', |
||||
|
'ordering': ['url'], |
||||
|
}, |
||||
|
|
||||
|
), |
||||
|
migrations.RunPython(zkopiruj_fotky, migrations.RunPython.noop), |
||||
|
] |
@ -0,0 +1,65 @@ |
|||||
|
from django.core.exceptions import ValidationError |
||||
|
from django.db import models |
||||
|
from django.utils import timezone |
||||
|
|
||||
|
|
||||
|
class FotkaHeader(models.Model): |
||||
|
class Meta: |
||||
|
ordering = ['-cas'] |
||||
|
db_table = 'fotky_header' |
||||
|
verbose_name = u'fotka do pozadí menu' |
||||
|
verbose_name_plural = u'fotky do pozadí menu' |
||||
|
|
||||
|
cas = models.DateTimeField(u'čas vložení fotky', default=timezone.now, help_text='Čas vložení fotky') |
||||
|
|
||||
|
nazev = models.CharField( |
||||
|
u'název fotky', null=False, blank=False, unique=True, primary_key=True, |
||||
|
max_length=50, help_text='Název např. archiv_noc' |
||||
|
) |
||||
|
|
||||
|
fotka = models.ImageField(upload_to='header', null=False, blank=False) |
||||
|
|
||||
|
def __str__(self): |
||||
|
return self.nazev |
||||
|
|
||||
|
def clean(self): |
||||
|
if not self.fotka: |
||||
|
raise ValidationError("Chybí obrázek") |
||||
|
""" Kontroluje, zda sedí poměr stran """ |
||||
|
if abs(self.fotka.width - (self.fotka.height * 970 / 350)) > 2: |
||||
|
raise ValidationError("Obrázek by měl mít rozměry 970w na 350h, nebo alespoň podobný poměr stran.") |
||||
|
super().clean() |
||||
|
|
||||
|
|
||||
|
class FotkaUrlVazba(models.Model): |
||||
|
class Meta: |
||||
|
ordering = ['url'] |
||||
|
db_table = 'fotky_url_vazby' |
||||
|
verbose_name = u'vazba url a fotky do pozadí menu' |
||||
|
verbose_name_plural = u'vazby url a fotek do pozadí menu' |
||||
|
|
||||
|
url = models.CharField( |
||||
|
u'URL', blank=True, null=False, max_length=100, |
||||
|
help_text='url prefix stránek např: /archiv/ nebo /' |
||||
|
) |
||||
|
|
||||
|
fotka = models.ForeignKey( |
||||
|
FotkaHeader, blank=False, null=False, verbose_name='fotka', |
||||
|
on_delete=models.CASCADE |
||||
|
) |
||||
|
|
||||
|
DOBA_DEN = 'den' |
||||
|
DOBA_NOC = 'noc' |
||||
|
DOBA_OBOJI = 'oboji' |
||||
|
DOBA_CHOICES = [ |
||||
|
(DOBA_DEN, 'Zobrazit jen ve dne'), |
||||
|
(DOBA_NOC, 'Zobrazit jen v noci'), |
||||
|
(DOBA_OBOJI, 'Zobrazovat pořád')] |
||||
|
|
||||
|
denni_doba = models.CharField('denní doba', max_length=16, choices=DOBA_CHOICES, blank=False, default=DOBA_OBOJI) |
||||
|
|
||||
|
def __str__(self): |
||||
|
return self.url |
||||
|
|
||||
|
def url_fotky(self): |
||||
|
return self.fotka.fotka.url |
@ -0,0 +1,7 @@ |
|||||
|
Přidání obrázků do odměn: |
||||
|
admin -> flatpage odměn -> ikona přidat obrázek |
||||
|
záložka odeslat, vybrat obrázek, odeslat |
||||
|
přespočí to zpět, velikost nechat, jen ok |
||||
|
přepnout na html zdroj, k obrázku (dovnitř img tagu) nahradit style za: |
||||
|
style="display:block; margin-left: auto; margin-right: auto; width: 70%;" |
||||
|
pro dort méně než 70%, asi 60% či 55%, okometricky |
@ -0,0 +1,16 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
set -e # Spadni pokud něco spadne |
||||
|
|
||||
|
# Check venvu |
||||
|
# NOTE: zkontroluje i správnou složku -- existencí Makefilu |
||||
|
make venv_check |
||||
|
|
||||
|
# Vygenerujeme testdata |
||||
|
./manage.py testdata |
||||
|
|
||||
|
# Nahrajeme statický obsah modelů |
||||
|
./manage.py loaddata flat.json sitetree_new.json |
||||
|
|
||||
|
# Posbíráme statické soubory |
||||
|
./manage.py collectstatic |
@ -1,13 +1,13 @@ |
|||||
from django import forms |
from django import forms |
||||
|
|
||||
class OpravaForm(forms.Form): |
class OpravaForm(forms.Form): |
||||
text = forms.CharField(max_length=256) |
text = forms.CharField(max_length=256) |
||||
autor = forms.CharField(max_length=20) |
autor = forms.CharField(max_length=20) |
||||
x = forms.IntegerField() |
x = forms.IntegerField() |
||||
y = forms.IntegerField() |
y = forms.IntegerField() |
||||
scroll = forms.CharField(max_length=256) |
scroll = forms.CharField(max_length=256) |
||||
pdf = forms.CharField(max_length=256) |
pdf = forms.CharField(max_length=256) |
||||
img_id = forms.CharField(max_length=256) |
img_id = forms.CharField(max_length=256) |
||||
id = forms.CharField(max_length=256) |
id = forms.CharField(max_length=256) |
||||
action = forms.CharField(max_length=256) |
action = forms.CharField(max_length=256) |
||||
|
|
||||
|
@ -0,0 +1,77 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.20 on 2019-04-30 21:40 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
import django.utils.timezone |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('korektury', '0015_auto_20161004_2005'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name='komentar', |
||||
|
name='cas', |
||||
|
field=models.DateTimeField(default=django.utils.timezone.now, help_text='Čas zadání komentáře', verbose_name='čas komentáře'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='komentar', |
||||
|
name='text', |
||||
|
field=models.TextField(blank=True, help_text='Text komentáře', verbose_name='text komentáře'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='korekturovanepdf', |
||||
|
name='cas', |
||||
|
field=models.DateTimeField(default=django.utils.timezone.now, help_text='Čas vložení PDF', verbose_name='čas vložení PDF'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='korekturovanepdf', |
||||
|
name='komentar', |
||||
|
field=models.TextField(blank=True, help_text='Komentář ke korekturovanému PDF (např. na co se zaměřit)', verbose_name='komentář k PDF'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='korekturovanepdf', |
||||
|
name='nazev', |
||||
|
field=models.CharField(blank=True, help_text='Název (např. 22.1 verze 4) korekturovaného PDF', max_length=50, verbose_name='název PDF'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='korekturovanepdf', |
||||
|
name='org', |
||||
|
field=models.ForeignKey(blank=True, default=None, help_text='Zodpovědný organizátor za obsah', null=True, on_delete=django.db.models.deletion.CASCADE, to='seminar.Organizator'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='korekturovanepdf', |
||||
|
name='status', |
||||
|
field=models.CharField(choices=[('pridavani', 'Přidávání korektur'), ('zanaseni', 'Korektury jsou zanášeny'), ('zastarale', 'Stará verze, nekorigovat')], default='pridavani', max_length=16, verbose_name='stav PDF'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='korekturovanepdf', |
||||
|
name='stran', |
||||
|
field=models.IntegerField(default=0, help_text='Počet stran PDF', verbose_name='počet stran'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='oprava', |
||||
|
name='autor', |
||||
|
field=models.ForeignKey(blank=True, help_text='Autor opravy', null=True, on_delete=django.db.models.deletion.CASCADE, to='seminar.Organizator'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='oprava', |
||||
|
name='status', |
||||
|
field=models.CharField(choices=[('k_oprave', 'K opravě'), ('opraveno', 'Opraveno'), ('neni_chyba', 'Není chyba'), ('k_zaneseni', 'K zanesení do TeXu')], default='k_oprave', max_length=16, verbose_name='stav opravy'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='oprava', |
||||
|
name='strana', |
||||
|
field=models.IntegerField(help_text='Strana s opravou (od 0)', verbose_name='strana s opravou'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='oprava', |
||||
|
name='text', |
||||
|
field=models.TextField(blank=True, help_text='Text opravy', verbose_name='text opravy'), |
||||
|
), |
||||
|
] |
@ -0,0 +1,36 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Generated by Django 1.11.21 on 2019-06-10 21:58 |
||||
|
from __future__ import unicode_literals |
||||
|
|
||||
|
from django.db import migrations, models |
||||
|
import django.db.models.deletion |
||||
|
|
||||
|
|
||||
|
class Migration(migrations.Migration): |
||||
|
|
||||
|
dependencies = [ |
||||
|
('korektury', '0016_auto_20190430_2340'), |
||||
|
] |
||||
|
|
||||
|
operations = [ |
||||
|
migrations.AlterField( |
||||
|
model_name='komentar', |
||||
|
name='autor', |
||||
|
field=models.ForeignKey(blank=True, help_text='Autor komentáře', null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.Organizator'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='korekturovanepdf', |
||||
|
name='org', |
||||
|
field=models.ForeignKey(blank=True, default=None, help_text='Zodpovědný organizátor za obsah', null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.Organizator'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='oprava', |
||||
|
name='autor', |
||||
|
field=models.ForeignKey(blank=True, help_text='Autor opravy', null=True, on_delete=django.db.models.deletion.SET_NULL, to='seminar.Organizator'), |
||||
|
), |
||||
|
migrations.AlterField( |
||||
|
model_name='oprava', |
||||
|
name='pdf', |
||||
|
field=models.ForeignKey(default=-1, on_delete=django.db.models.deletion.PROTECT, to='korektury.KorekturovanePDF'), |
||||
|
), |
||||
|
] |
@ -1,13 +0,0 @@ |
|||||
{% extends "base.html" %} |
|
||||
|
|
||||
{% block submenu %} |
|
||||
{% include "korektury/submenu.html" %} |
|
||||
{% endblock %} |
|
||||
|
|
||||
{% block content %} |
|
||||
{# blok do kterého se nacita text, v pripade jinyhc templatu obalit vlastnim blokem #} |
|
||||
{% endblock %} |
|
||||
|
|
||||
{% block title %} |
|
||||
{# blok pro titulek stranky #} |
|
||||
{% endblock %} |
|
@ -1,13 +0,0 @@ |
|||||
{% with "/korektury" as cesta %} |
|
||||
|
|
||||
<div id='submenu'> |
|
||||
<ul> |
|
||||
<li class="{% if selected == "aktualni" %}selected{% endif %}"><a href="{{cesta}}/">Aktuální</a> |
|
||||
<li class="{% if selected == "zastarale" %}selected{% endif %}"><a href="{{cesta}}/zastarale/">Zastaralé</a> |
|
||||
<li class="{% if selected == "help" %}selected{% endif %}"><a href="{{cesta}}/help/">Nápověda</a> |
|
||||
</ul> |
|
||||
</div> |
|
||||
|
|
||||
{% endwith %} |
|
||||
|
|
||||
|
|
@ -0,0 +1,69 @@ |
|||||
|
import logging |
||||
|
import os |
||||
|
from shutil import copyfile, rmtree |
||||
|
|
||||
|
from django.db import transaction |
||||
|
from django.conf import settings |
||||
|
|
||||
|
from korektury.models import KorekturovanePDF, generate_filename |
||||
|
|
||||
|
logger = logging.getLogger(__name__) |
||||
|
|
||||
|
@transaction.atomic |
||||
|
def create_test_pdf(rnd, organizatori): |
||||
|
logger.info('Vyrábím testovací pdf ke korekturovani') |
||||
|
try: |
||||
|
testpdfs = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'testpdfs') |
||||
|
|
||||
|
# smaže minulé pdfka a obrázky k nim a vytvoří (znovu) jejich složky |
||||
|
pdf_dir = os.path.join(settings.BASE_DIR, os.path.join('media', settings.KOREKTURY_PDF_DIR)) |
||||
|
img_dir = os.path.join(settings.BASE_DIR, os.path.join('media', settings.KOREKTURY_IMG_DIR)) |
||||
|
rmtree(pdf_dir, ignore_errors=True) |
||||
|
os.makedirs(pdf_dir) |
||||
|
rmtree(img_dir, ignore_errors=True) |
||||
|
os.makedirs(img_dir) |
||||
|
|
||||
|
def gen_filename(filename): |
||||
|
name = generate_filename(None, filename) |
||||
|
print(name) |
||||
|
copyfile(os.path.join(testpdfs, filename), os.path.join(settings.BASE_DIR, os.path.join('media', name))) |
||||
|
return name |
||||
|
|
||||
|
# TODO silent ghostscript (vypisuje odstavec za každou stránku…) |
||||
|
|
||||
|
KorekturovanePDF.objects.create( |
||||
|
nazev='B', komentar='Neuronové sítě', org=rnd.choice(organizatori), pdf=gen_filename(filename='B.pdf') |
||||
|
) |
||||
|
|
||||
|
KorekturovanePDF.objects.create( |
||||
|
nazev='A', komentar='M&M: Jak řešit?', org=rnd.choice(organizatori), pdf=gen_filename(filename='A.pdf') |
||||
|
) |
||||
|
|
||||
|
korekturovane_pdf = KorekturovanePDF.objects.create( |
||||
|
nazev='A', komentar='M&M: Jak řešit?', org=rnd.choice(organizatori), pdf=gen_filename(filename='A.pdf'), |
||||
|
status='zanaseni' |
||||
|
) |
||||
|
|
||||
|
KorekturovanePDF.objects.create( |
||||
|
nazev='A', komentar='M&M: Jak řešit?', org=rnd.choice(organizatori), pdf=gen_filename(filename='A.pdf'), |
||||
|
status='zastarale' |
||||
|
) |
||||
|
except (FileNotFoundError, Exception) as e: |
||||
|
# TODO najít správné chyby, které vyhazují různé systémy při neexistenci ImageMagick, nebo knihoven |
||||
|
logger.error(str(e)) |
||||
|
logger.error( |
||||
|
'Chyba vytváření testovacích korektur, pravděpodobně není nainstalován ImageMagick nebo některá z knihoven' |
||||
|
'pro práci se soubory pdf (ghostscript) nebo png (libpng?).\n' |
||||
|
''' |
||||
|
Instalaci na linux provedete např. příkazy: |
||||
|
sudo apt-get build-dep imagemagick |
||||
|
git clone https://github.com/ImageMagick/ImageMagick.git |
||||
|
cd ImageMagick/ |
||||
|
./configure |
||||
|
make |
||||
|
sudo make install |
||||
|
sudo ldconfig /usr/local/lib |
||||
|
cd .. |
||||
|
rm -r ImageMagick/ |
||||
|
''' |
||||
|
) |
@ -1,13 +1,10 @@ |
|||||
from django.conf.urls import * # NOQA |
from django.urls import path |
||||
from django.conf.urls import url |
from seminar.utils import org_required |
||||
from django.contrib.auth.decorators import user_passes_test |
|
||||
from . import views |
from . import views |
||||
|
|
||||
staff_member_required = user_passes_test(lambda u: u.is_staff) |
|
||||
|
|
||||
urlpatterns = [ |
urlpatterns = [ |
||||
url(r'^korektury/$', staff_member_required(views.KorekturyAktualniListView.as_view()), name='korektury-list'), |
path('korektury/', org_required(views.KorekturyAktualniListView.as_view()), name='korektury_list'), |
||||
url(r'^korektury/zastarale/$', staff_member_required(views.KorekturyZastaraleListView.as_view()), name='korektury-list-zastarale'), |
path('korektury/zastarale/', org_required(views.KorekturyZastaraleListView.as_view()), name='korektury_stare_list'), |
||||
url(r'^korektury/(?P<pdf>\d+)/$', staff_member_required(views.KorekturyView.as_view()), name='korektury'), |
path('korektury/<int:pdf>/', org_required(views.KorekturyView.as_view()), name='korektury'), |
||||
url(r'^korektury/help/', staff_member_required(views.KorekturyHelpView.as_view()), name='korektury-help'), |
path('korektury/help/', org_required(views.KorekturyHelpView.as_view()), name='korektury-help'), |
||||
] |
] |
||||
|
@ -1,27 +0,0 @@ |
|||||
|
|
||||
from datetime import datetime, date |
|
||||
|
|
||||
def vzhled(request): |
|
||||
''' Podle casu prida do templatu, zdali je nebo neni noc ''' |
|
||||
hodin = datetime.now().hour |
|
||||
if (hodin <= 6) or (hodin >= 20): |
|
||||
noc = True |
|
||||
else: |
|
||||
noc = False |
|
||||
return {'noc' : noc} |
|
||||
|
|
||||
def april(req): |
|
||||
if 'HTTP_X_APRIL' in req.META: |
|
||||
try: |
|
||||
year = int(req.META['HTTP_X_APRIL']) |
|
||||
return {'april': year} |
|
||||
except: |
|
||||
pass # Fall-back to regular behaviour |
|
||||
|
|
||||
import datetime |
|
||||
today = datetime.date.today() |
|
||||
if today.day == 1 and today.month == 4: |
|
||||
return {'april': today.year} |
|
||||
return {} |
|
||||
|
|
||||
|
|
@ -0,0 +1,15 @@ |
|||||
|
from rest_framework import routers |
||||
|
from seminar import viewsets as vs |
||||
|
|
||||
|
router = routers.DefaultRouter() |
||||
|
|
||||
|
router.register(r'ulohavzoraknode', vs.UlohaVzorakNodeViewSet,basename='ulohavzoraknode') |
||||
|
router.register(r'reseninode', vs.ReseniNodeViewSet,basename='reseninode') |
||||
|
router.register(r'text', vs.TextViewSet) |
||||
|
router.register(r'textnode', vs.TextNodeViewSet) |
||||
|
router.register(r'castnode', vs.CastNodeViewSet) |
||||
|
router.register(r'problem', vs.ProblemViewSet, basename='problem') |
||||
|
router.register(r'uloha', vs.UlohaViewSet, basename='uloha') |
||||
|
router.register(r'reseni', vs.ReseniViewSet, basename='reseni') |
||||
|
router.register(r'ulohazadaninode', vs.UlohaZadaniNodeViewSet) |
||||
|
|
@ -0,0 +1,13 @@ |
|||||
|
# Debugovaci nastaveni settings.py |
||||
|
# Pro vyber tohoto nastaveni muzete pouzit tez: |
||||
|
# DJANGO_SETTINGS_MODULE=mamweb.settings_debug ./manage.py ... |
||||
|
|
||||
|
# Import local settings |
||||
|
from .settings_local import * |
||||
|
|
||||
|
# Vypisovani databazovych dotazu do konzole |
||||
|
LOGGING['loggers']['django.db.backends'] = { |
||||
|
'level': 'DEBUG', |
||||
|
'handlers': ['console'], |
||||
|
'propagate': False, |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
/* |
||||
|
.pink { |
||||
|
background-color: #ffc0cb; |
||||
|
} |
||||
|
|
||||
|
div.borderized { |
||||
|
border-style: solid; |
||||
|
border-radius: 5px; |
||||
|
padding: 5px; |
||||
|
padding-right: 20px; |
||||
|
} |
||||
|
|
||||
|
div.tnmenu { |
||||
|
float: right; |
||||
|
margin-right: 0px; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
div.parent { |
||||
|
border-width: 2px; |
||||
|
} |
||||
|
|
||||
|
div.children { |
||||
|
border-width: 1px; |
||||
|
} |
||||
|
|
||||
|
div.node_type { |
||||
|
background-color: #d4d4d4; |
||||
|
} |
||||
|
|
||||
|
.hidden-tn { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
/*test*/ |
||||
|
h1 { |
||||
|
color: chartreuse; |
||||
|
} |
Before Width: | Height: | Size: 218 B |
@ -0,0 +1,201 @@ |
|||||
|
Apache License |
||||
|
Version 2.0, January 2004 |
||||
|
http://www.apache.org/licenses/ |
||||
|
|
||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||
|
|
||||
|
1. Definitions. |
||||
|
|
||||
|
"License" shall mean the terms and conditions for use, reproduction, |
||||
|
and distribution as defined by Sections 1 through 9 of this document. |
||||
|
|
||||
|
"Licensor" shall mean the copyright owner or entity authorized by |
||||
|
the copyright owner that is granting the License. |
||||
|
|
||||
|
"Legal Entity" shall mean the union of the acting entity and all |
||||
|
other entities that control, are controlled by, or are under common |
||||
|
control with that entity. For the purposes of this definition, |
||||
|
"control" means (i) the power, direct or indirect, to cause the |
||||
|
direction or management of such entity, whether by contract or |
||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||
|
outstanding shares, or (iii) beneficial ownership of such entity. |
||||
|
|
||||
|
"You" (or "Your") shall mean an individual or Legal Entity |
||||
|
exercising permissions granted by this License. |
||||
|
|
||||
|
"Source" form shall mean the preferred form for making modifications, |
||||
|
including but not limited to software source code, documentation |
||||
|
source, and configuration files. |
||||
|
|
||||
|
"Object" form shall mean any form resulting from mechanical |
||||
|
transformation or translation of a Source form, including but |
||||
|
not limited to compiled object code, generated documentation, |
||||
|
and conversions to other media types. |
||||
|
|
||||
|
"Work" shall mean the work of authorship, whether in Source or |
||||
|
Object form, made available under the License, as indicated by a |
||||
|
copyright notice that is included in or attached to the work |
||||
|
(an example is provided in the Appendix below). |
||||
|
|
||||
|
"Derivative Works" shall mean any work, whether in Source or Object |
||||
|
form, that is based on (or derived from) the Work and for which the |
||||
|
editorial revisions, annotations, elaborations, or other modifications |
||||
|
represent, as a whole, an original work of authorship. For the purposes |
||||
|
of this License, Derivative Works shall not include works that remain |
||||
|
separable from, or merely link (or bind by name) to the interfaces of, |
||||
|
the Work and Derivative Works thereof. |
||||
|
|
||||
|
"Contribution" shall mean any work of authorship, including |
||||
|
the original version of the Work and any modifications or additions |
||||
|
to that Work or Derivative Works thereof, that is intentionally |
||||
|
submitted to Licensor for inclusion in the Work by the copyright owner |
||||
|
or by an individual or Legal Entity authorized to submit on behalf of |
||||
|
the copyright owner. For the purposes of this definition, "submitted" |
||||
|
means any form of electronic, verbal, or written communication sent |
||||
|
to the Licensor or its representatives, including but not limited to |
||||
|
communication on electronic mailing lists, source code control systems, |
||||
|
and issue tracking systems that are managed by, or on behalf of, the |
||||
|
Licensor for the purpose of discussing and improving the Work, but |
||||
|
excluding communication that is conspicuously marked or otherwise |
||||
|
designated in writing by the copyright owner as "Not a Contribution." |
||||
|
|
||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity |
||||
|
on behalf of whom a Contribution has been received by Licensor and |
||||
|
subsequently incorporated within the Work. |
||||
|
|
||||
|
2. Grant of Copyright License. Subject to the terms and conditions of |
||||
|
this License, each Contributor hereby grants to You a perpetual, |
||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
|
copyright license to reproduce, prepare Derivative Works of, |
||||
|
publicly display, publicly perform, sublicense, and distribute the |
||||
|
Work and such Derivative Works in Source or Object form. |
||||
|
|
||||
|
3. Grant of Patent License. Subject to the terms and conditions of |
||||
|
this License, each Contributor hereby grants to You a perpetual, |
||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
|
(except as stated in this section) patent license to make, have made, |
||||
|
use, offer to sell, sell, import, and otherwise transfer the Work, |
||||
|
where such license applies only to those patent claims licensable |
||||
|
by such Contributor that are necessarily infringed by their |
||||
|
Contribution(s) alone or by combination of their Contribution(s) |
||||
|
with the Work to which such Contribution(s) was submitted. If You |
||||
|
institute patent litigation against any entity (including a |
||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work |
||||
|
or a Contribution incorporated within the Work constitutes direct |
||||
|
or contributory patent infringement, then any patent licenses |
||||
|
granted to You under this License for that Work shall terminate |
||||
|
as of the date such litigation is filed. |
||||
|
|
||||
|
4. Redistribution. You may reproduce and distribute copies of the |
||||
|
Work or Derivative Works thereof in any medium, with or without |
||||
|
modifications, and in Source or Object form, provided that You |
||||
|
meet the following conditions: |
||||
|
|
||||
|
(a) You must give any other recipients of the Work or |
||||
|
Derivative Works a copy of this License; and |
||||
|
|
||||
|
(b) You must cause any modified files to carry prominent notices |
||||
|
stating that You changed the files; and |
||||
|
|
||||
|
(c) You must retain, in the Source form of any Derivative Works |
||||
|
that You distribute, all copyright, patent, trademark, and |
||||
|
attribution notices from the Source form of the Work, |
||||
|
excluding those notices that do not pertain to any part of |
||||
|
the Derivative Works; and |
||||
|
|
||||
|
(d) If the Work includes a "NOTICE" text file as part of its |
||||
|
distribution, then any Derivative Works that You distribute must |
||||
|
include a readable copy of the attribution notices contained |
||||
|
within such NOTICE file, excluding those notices that do not |
||||
|
pertain to any part of the Derivative Works, in at least one |
||||
|
of the following places: within a NOTICE text file distributed |
||||
|
as part of the Derivative Works; within the Source form or |
||||
|
documentation, if provided along with the Derivative Works; or, |
||||
|
within a display generated by the Derivative Works, if and |
||||
|
wherever such third-party notices normally appear. The contents |
||||
|
of the NOTICE file are for informational purposes only and |
||||
|
do not modify the License. You may add Your own attribution |
||||
|
notices within Derivative Works that You distribute, alongside |
||||
|
or as an addendum to the NOTICE text from the Work, provided |
||||
|
that such additional attribution notices cannot be construed |
||||
|
as modifying the License. |
||||
|
|
||||
|
You may add Your own copyright statement to Your modifications and |
||||
|
may provide additional or different license terms and conditions |
||||
|
for use, reproduction, or distribution of Your modifications, or |
||||
|
for any such Derivative Works as a whole, provided Your use, |
||||
|
reproduction, and distribution of the Work otherwise complies with |
||||
|
the conditions stated in this License. |
||||
|
|
||||
|
5. Submission of Contributions. Unless You explicitly state otherwise, |
||||
|
any Contribution intentionally submitted for inclusion in the Work |
||||
|
by You to the Licensor shall be under the terms and conditions of |
||||
|
this License, without any additional terms or conditions. |
||||
|
Notwithstanding the above, nothing herein shall supersede or modify |
||||
|
the terms of any separate license agreement you may have executed |
||||
|
with Licensor regarding such Contributions. |
||||
|
|
||||
|
6. Trademarks. This License does not grant permission to use the trade |
||||
|
names, trademarks, service marks, or product names of the Licensor, |
||||
|
except as required for reasonable and customary use in describing the |
||||
|
origin of the Work and reproducing the content of the NOTICE file. |
||||
|
|
||||
|
7. Disclaimer of Warranty. Unless required by applicable law or |
||||
|
agreed to in writing, Licensor provides the Work (and each |
||||
|
Contributor provides its Contributions) on an "AS IS" BASIS, |
||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
||||
|
implied, including, without limitation, any warranties or conditions |
||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the |
||||
|
appropriateness of using or redistributing the Work and assume any |
||||
|
risks associated with Your exercise of permissions under this License. |
||||
|
|
||||
|
8. Limitation of Liability. In no event and under no legal theory, |
||||
|
whether in tort (including negligence), contract, or otherwise, |
||||
|
unless required by applicable law (such as deliberate and grossly |
||||
|
negligent acts) or agreed to in writing, shall any Contributor be |
||||
|
liable to You for damages, including any direct, indirect, special, |
||||
|
incidental, or consequential damages of any character arising as a |
||||
|
result of this License or out of the use or inability to use the |
||||
|
Work (including but not limited to damages for loss of goodwill, |
||||
|
work stoppage, computer failure or malfunction, or any and all |
||||
|
other commercial damages or losses), even if such Contributor |
||||
|
has been advised of the possibility of such damages. |
||||
|
|
||||
|
9. Accepting Warranty or Additional Liability. While redistributing |
||||
|
the Work or Derivative Works thereof, You may choose to offer, |
||||
|
and charge a fee for, acceptance of support, warranty, indemnity, |
||||
|
or other liability obligations and/or rights consistent with this |
||||
|
License. However, in accepting such obligations, You may act only |
||||
|
on Your own behalf and on Your sole responsibility, not on behalf |
||||
|
of any other Contributor, and only if You agree to indemnify, |
||||
|
defend, and hold each Contributor harmless for any liability |
||||
|
incurred by, or claims asserted against, such Contributor by reason |
||||
|
of your accepting any such warranty or additional liability. |
||||
|
|
||||
|
END OF TERMS AND CONDITIONS |
||||
|
|
||||
|
APPENDIX: How to apply the Apache License to your work. |
||||
|
|
||||
|
To apply the Apache License to your work, attach the following |
||||
|
boilerplate notice, with the fields enclosed by brackets "[]" |
||||
|
replaced with your own identifying information. (Don't include |
||||
|
the brackets!) The text should be enclosed in the appropriate |
||||
|
comment syntax for the file format. We also recommend that a |
||||
|
file or class name and description of purpose be included on the |
||||
|
same "printed page" as the copyright notice for easier |
||||
|
identification within third-party archives. |
||||
|
|
||||
|
Copyright [yyyy] [name of copyright owner] |
||||
|
|
||||
|
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
|
you may not use this file except in compliance with the License. |
||||
|
You may obtain a copy of the License at |
||||
|
|
||||
|
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
|
||||
|
Unless required by applicable law or agreed to in writing, software |
||||
|
distributed under the License is distributed on an "AS IS" BASIS, |
||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
|
See the License for the specific language governing permissions and |
||||
|
limitations under the License. |
After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 568 KiB |
After Width: | Height: | Size: 203 KiB |
After Width: | Height: | Size: 2.4 MiB |
After Width: | Height: | Size: 56 KiB |