From 2bb732959ac84f41f0c163a4235d24ace5b76b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 10:31:20 +0200 Subject: [PATCH 01/14] =?UTF-8?q?Nepou=C5=BE=C3=ADvan=C3=BD=20k=C3=B3d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/utils.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/seminar/utils.py b/seminar/utils.py index ddce769c..7c009210 100644 --- a/seminar/utils.py +++ b/seminar/utils.py @@ -6,7 +6,6 @@ import decimal from django.contrib.auth import get_user_model from django.contrib.auth.decorators import permission_required, \ user_passes_test -from html.parser import HTMLParser from django import views as DjangoViews from django.db import transaction @@ -55,16 +54,6 @@ def inverze_vzorecku_na_prepocet(body: decimal.Decimal, resitelu) -> decimal.Dec return round(body * (resitelu + 2) / 3, 1) -class FirstTagParser(HTMLParser): - def __init__(self, *args, **kwargs): - self.firstTag = None - super().__init__(*args, **kwargs) - - def handle_data(self, data): - if self.firstTag == None: - self.firstTag = data - - def histogram(seznam): d = {} for i in seznam: -- 2.39.2 From 350623c6ac33f3ab5c684c9930779644ff29ca19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 10:38:00 +0200 Subject: [PATCH 02/14] =?UTF-8?q?Python=20u=C5=BE=20je=20d=C3=A1vno=20defa?= =?UTF-8?q?ultn=C4=9B=20utf-8,=20net=C5=99eba=20deklarace=20na=20za=C4=8D?= =?UTF-8?q?=C3=A1tku=20souboru?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- galerie/admin.py | 2 -- galerie/autocomplete_light_registry.py.old | 2 -- galerie/forms.py | 2 -- galerie/migrations/0001_initial.py | 1 - galerie/migrations/0002_auto_20151013_1145.py | 1 - galerie/migrations/0003_add_galerie_poradi.py | 1 - galerie/migrations/0004_nepovinna_galerie_u_obrazku.py | 1 - galerie/migrations/0005_obrazek_ordering_datum.py | 1 - galerie/migrations/0006_django_imagekit.py | 1 - galerie/migrations/0007_obrazek_odstranen_datum.py | 1 - galerie/migrations/0008_auto_20190430_2340.py | 1 - galerie/migrations/0009_auto_20190610_2358.py | 1 - galerie/models.py | 2 -- galerie/views.py | 2 -- korektury/migrations/0001_initial.py | 1 - korektury/migrations/0002_auto_20151202_2351.py | 1 - korektury/migrations/0003_auto_20151204_1855.py | 1 - korektury/migrations/0004_auto_20151204_2240.py | 1 - korektury/migrations/0005_auto_20151204_2244.py | 1 - korektury/migrations/0006_oprava_pdf.py | 1 - korektury/migrations/0007_auto_20151225_1237.py | 1 - korektury/migrations/0008_auto_20151229_1556.py | 1 - korektury/migrations/0009_trizeni_korektur_v_seznamu.py | 1 - korektury/migrations/0010_Pridani_odkazu_na_organizatora.py | 1 - .../migrations/0011_prevod_autora_z_charField_na_Organizator.py | 1 - korektury/migrations/0012_delete_autor.py | 1 - korektury/migrations/0013_rename_autor_org.py | 1 - korektury/migrations/0014_add_org_to_pdf.py | 1 - korektury/migrations/0015_auto_20161004_2005.py | 1 - korektury/migrations/0016_auto_20190430_2340.py | 1 - korektury/migrations/0017_auto_20190610_2358.py | 1 - mamweb/settings_prod.py | 2 -- mamweb/settings_test.py | 2 -- personalni/models.py | 1 - prednasky/admin.py | 1 - prednasky/forms.py | 1 - prednasky/migrations/0001_initial.py | 1 - prednasky/migrations/0002_auto_20160417_2347.py | 1 - prednasky/migrations/0003_auto_20160929_0117.py | 1 - prednasky/migrations/0004_remove_prednaska_seznam.py | 1 - prednasky/migrations/0005_auto_20160929_0153.py | 1 - prednasky/migrations/0006_hlasovani_seznam.py | 1 - prednasky/migrations/0007_prednaska_seznamy.py | 1 - prednasky/migrations/0008_auto_20160929_0225.py | 1 - prednasky/migrations/0009_auto_20160929_0354.py | 1 - prednasky/migrations/0010_auto_20160929_0508.py | 1 - prednasky/migrations/0011_auto_20190430_2340.py | 1 - prednasky/migrations/0012_auto_20190610_2358.py | 1 - prednasky/models.py | 2 -- prednasky/views.py | 1 - requirements.txt | 1 - seminar/management/commands/load_org_permissions.py | 2 -- seminar/management/commands/save_org_permissions.py | 2 -- seminar/management/commands/testdata.py | 2 -- seminar/migrations/0001_initial.py | 1 - seminar/migrations/0002_add_body_views.py | 1 - seminar/migrations/0003_add_skola_zs_ss.py | 1 - seminar/migrations/0004_add_old_dakos_id.py | 1 - seminar/migrations/0005_alter_problem_autor.py | 1 - seminar/migrations/0006_problem_add_timestamp.py | 1 - seminar/migrations/0007_problem_zamereni.py | 1 - seminar/migrations/0008_reseni_forma.py | 1 - seminar/migrations/0009_rename_imported_IDs.py | 1 - seminar/migrations/0010_alter_rok_maturity.py | 1 - seminar/migrations/0011_alter_timestamp_def.py | 1 - seminar/migrations/0012_remove_soustredeni_ucastnici.py | 1 - seminar/migrations/0013_soustredeni_ucastnici_through_model.py | 1 - seminar/migrations/0014_uprava_poznamek.py | 1 - seminar/migrations/0015_soustredeni_text.py | 1 - seminar/migrations/0016_texty_problemu.py | 1 - seminar/migrations/0017_texty_problemu_minor.py | 1 - seminar/migrations/0018_problemnavrh_problemzadany.py | 1 - seminar/migrations/0019_rocnik_ciselne.py | 1 - seminar/migrations/0020_indexy_a_razeni.py | 1 - seminar/migrations/0021_cislo_verejna_vysledkovka.py | 1 - seminar/migrations/0022_decimal_body.py | 1 - seminar/migrations/0023_add_novinky.py | 1 - seminar/migrations/0024_add_organizator.py | 1 - seminar/migrations/0025_zmena_cesty_nahravani_obrazku.py | 1 - seminar/migrations/0026_soustredeni_typ.py | 1 - seminar/migrations/0027_export_flag_a_typ_akce.py | 1 - seminar/migrations/0028_add_body_celkem_views.py | 1 - seminar/migrations/0029_fix_body_celkem_views.py | 1 - seminar/migrations/0030_add_vysledky.py | 1 - seminar/migrations/0031_cislo_pdf.py | 1 - seminar/migrations/0032_cislo_pdf_blank_typos.py | 1 - seminar/migrations/0033_organizator_studuje_popisek.py | 1 - seminar/migrations/0034_reseni_forma_default_email.py | 1 - seminar/migrations/0035_django_imagekit.py | 1 - seminar/migrations/0036_add_org_to_soustredeni.py | 1 - seminar/migrations/0037_prispevek.py | 1 - seminar/migrations/0038_change_meta_prispevek.py | 1 - seminar/migrations/0039_pohadka.py | 1 - seminar/migrations/0040_pohadka_nepovinny_autor.py | 1 - seminar/migrations/0041_konfery.py | 1 - seminar/migrations/0042_auto_20161005_0847.py | 1 - seminar/migrations/0042_cislo_faze.py | 1 - seminar/migrations/0043_uprava_faze.py | 1 - seminar/migrations/0044_uprava_faze.py | 1 - seminar/migrations/0045_cislo_pridani_faze_nahrano.py | 1 - seminar/migrations/0046_merge.py | 1 - seminar/migrations/0047_auto_20170120_2118.py | 1 - seminar/migrations/0048_add_cislo_datum_deadline_soustredeni.py | 1 - seminar/migrations/0049_auto_20190430_2354.py | 1 - seminar/migrations/0050_auto_20190510_2228.py | 1 - seminar/migrations/0051_resitel_to_osoba.py | 1 - seminar/migrations/0052_user_to_organizator.py | 1 - seminar/migrations/0053_organizator_organizuje_od_do.py | 1 - seminar/migrations/0055_smazat_nemigrovane_zastarale_veci.py | 1 - seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py | 1 - seminar/migrations/0057_reseni_to_reseni_hodnoceni.py | 1 - seminar/migrations/0058_problem_to_uloha_tema_clanek.py | 1 - seminar/migrations/0059_vytvorit_pohadkanode.py | 1 - seminar/migrations/0060_spoj_stromy.py | 1 - seminar/migrations/0061_kill_frankenstein.py | 1 - seminar/migrations/0062_redukce_modelu_pohadky.py | 1 - seminar/migrations/0063_procisteni_migraci.py | 1 - seminar/migrations/0064_auto_20190610_2358.py | 1 - seminar/models/pomocne.py | 1 - seminar/models/treenode.py | 1 - seminar/models/tvorba.py | 1 - seminar/testutils.py | 2 -- seminar/utils.py | 2 -- soustredeni/models.py | 1 - 124 files changed, 137 deletions(-) diff --git a/galerie/admin.py b/galerie/admin.py index 54b0751e..2b270163 100644 --- a/galerie/admin.py +++ b/galerie/admin.py @@ -1,5 +1,3 @@ -#coding: utf-8 - from galerie.models import Obrazek, Galerie from django.contrib import admin from django.http import HttpResponseRedirect diff --git a/galerie/autocomplete_light_registry.py.old b/galerie/autocomplete_light_registry.py.old index dcedfc1a..8a0c5952 100644 --- a/galerie/autocomplete_light_registry.py.old +++ b/galerie/autocomplete_light_registry.py.old @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from autocomplete_light import shortcuts as autocomplete_light from .models import Obrazek, Galerie diff --git a/galerie/forms.py b/galerie/forms.py index e6666884..e27b53fb 100644 --- a/galerie/forms.py +++ b/galerie/forms.py @@ -1,5 +1,3 @@ -#coding: utf-8 - from django import forms from seminar.models import Soustredeni diff --git a/galerie/migrations/0001_initial.py b/galerie/migrations/0001_initial.py index 21701185..9e65fe22 100644 --- a/galerie/migrations/0001_initial.py +++ b/galerie/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/galerie/migrations/0002_auto_20151013_1145.py b/galerie/migrations/0002_auto_20151013_1145.py index ea241267..5ec830a6 100644 --- a/galerie/migrations/0002_auto_20151013_1145.py +++ b/galerie/migrations/0002_auto_20151013_1145.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/galerie/migrations/0003_add_galerie_poradi.py b/galerie/migrations/0003_add_galerie_poradi.py index d9b32f48..a8abf94d 100644 --- a/galerie/migrations/0003_add_galerie_poradi.py +++ b/galerie/migrations/0003_add_galerie_poradi.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/galerie/migrations/0004_nepovinna_galerie_u_obrazku.py b/galerie/migrations/0004_nepovinna_galerie_u_obrazku.py index 53e17922..a2b593b1 100644 --- a/galerie/migrations/0004_nepovinna_galerie_u_obrazku.py +++ b/galerie/migrations/0004_nepovinna_galerie_u_obrazku.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/galerie/migrations/0005_obrazek_ordering_datum.py b/galerie/migrations/0005_obrazek_ordering_datum.py index 988e0fd4..cc6f2948 100644 --- a/galerie/migrations/0005_obrazek_ordering_datum.py +++ b/galerie/migrations/0005_obrazek_ordering_datum.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/galerie/migrations/0006_django_imagekit.py b/galerie/migrations/0006_django_imagekit.py index 6b90b791..b38caae3 100644 --- a/galerie/migrations/0006_django_imagekit.py +++ b/galerie/migrations/0006_django_imagekit.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/galerie/migrations/0007_obrazek_odstranen_datum.py b/galerie/migrations/0007_obrazek_odstranen_datum.py index 94c3596b..9ee8ac46 100644 --- a/galerie/migrations/0007_obrazek_odstranen_datum.py +++ b/galerie/migrations/0007_obrazek_odstranen_datum.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/galerie/migrations/0008_auto_20190430_2340.py b/galerie/migrations/0008_auto_20190430_2340.py index 140d554a..df70a161 100644 --- a/galerie/migrations/0008_auto_20190430_2340.py +++ b/galerie/migrations/0008_auto_20190430_2340.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-30 21:40 from __future__ import unicode_literals diff --git a/galerie/migrations/0009_auto_20190610_2358.py b/galerie/migrations/0009_auto_20190610_2358.py index 0228a8a7..513ee1de 100644 --- a/galerie/migrations/0009_auto_20190610_2358.py +++ b/galerie/migrations/0009_auto_20190610_2358.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-10 21:58 from __future__ import unicode_literals diff --git a/galerie/models.py b/galerie/models.py index 96225101..074b0d26 100644 --- a/galerie/models.py +++ b/galerie/models.py @@ -1,5 +1,3 @@ -# coding: utf-8 - from django.db import models #from django.db.models import Q from imagekit.models import ImageSpecField diff --git a/galerie/views.py b/galerie/views.py index f0d9b53b..872bb46e 100644 --- a/galerie/views.py +++ b/galerie/views.py @@ -1,5 +1,3 @@ -# coding: utf-8 - import random from django.http import HttpResponse, Http404 diff --git a/korektury/migrations/0001_initial.py b/korektury/migrations/0001_initial.py index e9a89d18..37c2d18e 100644 --- a/korektury/migrations/0001_initial.py +++ b/korektury/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/korektury/migrations/0002_auto_20151202_2351.py b/korektury/migrations/0002_auto_20151202_2351.py index 2e7a8032..ed17b81c 100644 --- a/korektury/migrations/0002_auto_20151202_2351.py +++ b/korektury/migrations/0002_auto_20151202_2351.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/korektury/migrations/0003_auto_20151204_1855.py b/korektury/migrations/0003_auto_20151204_1855.py index 8f8cb70b..f08d8ece 100644 --- a/korektury/migrations/0003_auto_20151204_1855.py +++ b/korektury/migrations/0003_auto_20151204_1855.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/korektury/migrations/0004_auto_20151204_2240.py b/korektury/migrations/0004_auto_20151204_2240.py index ed47ccaf..18413ce0 100644 --- a/korektury/migrations/0004_auto_20151204_2240.py +++ b/korektury/migrations/0004_auto_20151204_2240.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/korektury/migrations/0005_auto_20151204_2244.py b/korektury/migrations/0005_auto_20151204_2244.py index 52ebdfb6..7047a49c 100644 --- a/korektury/migrations/0005_auto_20151204_2244.py +++ b/korektury/migrations/0005_auto_20151204_2244.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/korektury/migrations/0006_oprava_pdf.py b/korektury/migrations/0006_oprava_pdf.py index e8f81884..988388b2 100644 --- a/korektury/migrations/0006_oprava_pdf.py +++ b/korektury/migrations/0006_oprava_pdf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/korektury/migrations/0007_auto_20151225_1237.py b/korektury/migrations/0007_auto_20151225_1237.py index 805e3510..6f6436d5 100644 --- a/korektury/migrations/0007_auto_20151225_1237.py +++ b/korektury/migrations/0007_auto_20151225_1237.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/korektury/migrations/0008_auto_20151229_1556.py b/korektury/migrations/0008_auto_20151229_1556.py index 50e28379..253fe64d 100644 --- a/korektury/migrations/0008_auto_20151229_1556.py +++ b/korektury/migrations/0008_auto_20151229_1556.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/korektury/migrations/0009_trizeni_korektur_v_seznamu.py b/korektury/migrations/0009_trizeni_korektur_v_seznamu.py index c4099dce..8fde3a28 100644 --- a/korektury/migrations/0009_trizeni_korektur_v_seznamu.py +++ b/korektury/migrations/0009_trizeni_korektur_v_seznamu.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/korektury/migrations/0010_Pridani_odkazu_na_organizatora.py b/korektury/migrations/0010_Pridani_odkazu_na_organizatora.py index 6b318cab..445496ee 100644 --- a/korektury/migrations/0010_Pridani_odkazu_na_organizatora.py +++ b/korektury/migrations/0010_Pridani_odkazu_na_organizatora.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/korektury/migrations/0011_prevod_autora_z_charField_na_Organizator.py b/korektury/migrations/0011_prevod_autora_z_charField_na_Organizator.py index 53082df9..30d40ef5 100644 --- a/korektury/migrations/0011_prevod_autora_z_charField_na_Organizator.py +++ b/korektury/migrations/0011_prevod_autora_z_charField_na_Organizator.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/korektury/migrations/0012_delete_autor.py b/korektury/migrations/0012_delete_autor.py index 4f41a955..ad542e18 100644 --- a/korektury/migrations/0012_delete_autor.py +++ b/korektury/migrations/0012_delete_autor.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/korektury/migrations/0013_rename_autor_org.py b/korektury/migrations/0013_rename_autor_org.py index db0d3151..99d1b3f4 100644 --- a/korektury/migrations/0013_rename_autor_org.py +++ b/korektury/migrations/0013_rename_autor_org.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/korektury/migrations/0014_add_org_to_pdf.py b/korektury/migrations/0014_add_org_to_pdf.py index afd939ba..d497ea16 100644 --- a/korektury/migrations/0014_add_org_to_pdf.py +++ b/korektury/migrations/0014_add_org_to_pdf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/korektury/migrations/0015_auto_20161004_2005.py b/korektury/migrations/0015_auto_20161004_2005.py index 36be10df..d4659ffc 100644 --- a/korektury/migrations/0015_auto_20161004_2005.py +++ b/korektury/migrations/0015_auto_20161004_2005.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/korektury/migrations/0016_auto_20190430_2340.py b/korektury/migrations/0016_auto_20190430_2340.py index f14bce2b..7c264485 100644 --- a/korektury/migrations/0016_auto_20190430_2340.py +++ b/korektury/migrations/0016_auto_20190430_2340.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-30 21:40 from __future__ import unicode_literals diff --git a/korektury/migrations/0017_auto_20190610_2358.py b/korektury/migrations/0017_auto_20190610_2358.py index 111f2f8f..a135a020 100644 --- a/korektury/migrations/0017_auto_20190610_2358.py +++ b/korektury/migrations/0017_auto_20190610_2358.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-10 21:58 from __future__ import unicode_literals diff --git a/mamweb/settings_prod.py b/mamweb/settings_prod.py index 060ba870..7d9c99e9 100644 --- a/mamweb/settings_prod.py +++ b/mamweb/settings_prod.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import os.path # diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py index dc5beee8..83c08b92 100644 --- a/mamweb/settings_test.py +++ b/mamweb/settings_test.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import os.path # diff --git a/personalni/models.py b/personalni/models.py index d7beb22a..8f6cd63f 100644 --- a/personalni/models.py +++ b/personalni/models.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import logging from django.db import models diff --git a/prednasky/admin.py b/prednasky/admin.py index c9807b27..d086cd0c 100644 --- a/prednasky/admin.py +++ b/prednasky/admin.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib import messages from reversion.admin import VersionAdmin diff --git a/prednasky/forms.py b/prednasky/forms.py index 071d068e..f095a64e 100644 --- a/prednasky/forms.py +++ b/prednasky/forms.py @@ -1,4 +1,3 @@ -# coding: utf-8 from django import forms class NewPrednaskyForm(forms.Form): diff --git a/prednasky/migrations/0001_initial.py b/prednasky/migrations/0001_initial.py index 07da4a4e..06db1d7b 100644 --- a/prednasky/migrations/0001_initial.py +++ b/prednasky/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0002_auto_20160417_2347.py b/prednasky/migrations/0002_auto_20160417_2347.py index aa09d465..10e5d24c 100644 --- a/prednasky/migrations/0002_auto_20160417_2347.py +++ b/prednasky/migrations/0002_auto_20160417_2347.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0003_auto_20160929_0117.py b/prednasky/migrations/0003_auto_20160929_0117.py index 606d6cf7..3c6929fa 100644 --- a/prednasky/migrations/0003_auto_20160929_0117.py +++ b/prednasky/migrations/0003_auto_20160929_0117.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0004_remove_prednaska_seznam.py b/prednasky/migrations/0004_remove_prednaska_seznam.py index d149199f..4eee9c42 100644 --- a/prednasky/migrations/0004_remove_prednaska_seznam.py +++ b/prednasky/migrations/0004_remove_prednaska_seznam.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0005_auto_20160929_0153.py b/prednasky/migrations/0005_auto_20160929_0153.py index 7ecff0a0..b7aa5814 100644 --- a/prednasky/migrations/0005_auto_20160929_0153.py +++ b/prednasky/migrations/0005_auto_20160929_0153.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0006_hlasovani_seznam.py b/prednasky/migrations/0006_hlasovani_seznam.py index e1b7bd8f..05f9acc3 100644 --- a/prednasky/migrations/0006_hlasovani_seznam.py +++ b/prednasky/migrations/0006_hlasovani_seznam.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0007_prednaska_seznamy.py b/prednasky/migrations/0007_prednaska_seznamy.py index 8f054e17..335cceef 100644 --- a/prednasky/migrations/0007_prednaska_seznamy.py +++ b/prednasky/migrations/0007_prednaska_seznamy.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0008_auto_20160929_0225.py b/prednasky/migrations/0008_auto_20160929_0225.py index a5bbb92e..054ad059 100644 --- a/prednasky/migrations/0008_auto_20160929_0225.py +++ b/prednasky/migrations/0008_auto_20160929_0225.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0009_auto_20160929_0354.py b/prednasky/migrations/0009_auto_20160929_0354.py index 6b4f9486..5b5bb54f 100644 --- a/prednasky/migrations/0009_auto_20160929_0354.py +++ b/prednasky/migrations/0009_auto_20160929_0354.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0010_auto_20160929_0508.py b/prednasky/migrations/0010_auto_20160929_0508.py index b654e23f..30a33395 100644 --- a/prednasky/migrations/0010_auto_20160929_0508.py +++ b/prednasky/migrations/0010_auto_20160929_0508.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/prednasky/migrations/0011_auto_20190430_2340.py b/prednasky/migrations/0011_auto_20190430_2340.py index a01d1878..dc081254 100644 --- a/prednasky/migrations/0011_auto_20190430_2340.py +++ b/prednasky/migrations/0011_auto_20190430_2340.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-30 21:40 from __future__ import unicode_literals diff --git a/prednasky/migrations/0012_auto_20190610_2358.py b/prednasky/migrations/0012_auto_20190610_2358.py index 1ca6db83..f6551d8a 100644 --- a/prednasky/migrations/0012_auto_20190610_2358.py +++ b/prednasky/migrations/0012_auto_20190610_2358.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-10 21:58 from __future__ import unicode_literals diff --git a/prednasky/models.py b/prednasky/models.py index 54764381..74b37403 100644 --- a/prednasky/models.py +++ b/prednasky/models.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from django.db import models from soustredeni.models import Soustredeni diff --git a/prednasky/views.py b/prednasky/views.py index 2c370b7a..699b690d 100644 --- a/prednasky/views.py +++ b/prednasky/views.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.shortcuts import render, get_object_or_404 from django.views import generic from django.shortcuts import HttpResponseRedirect diff --git a/requirements.txt b/requirements.txt index 4a7163d3..6855e0ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- -c constraints.txt # basic libs diff --git a/seminar/management/commands/load_org_permissions.py b/seminar/management/commands/load_org_permissions.py index c1e4a106..6b4f9e0a 100644 --- a/seminar/management/commands/load_org_permissions.py +++ b/seminar/management/commands/load_org_permissions.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from django.core.management.base import BaseCommand from django.contrib.sessions.models import Session from django.contrib.auth.models import Group, Permission diff --git a/seminar/management/commands/save_org_permissions.py b/seminar/management/commands/save_org_permissions.py index a6814e6f..216f9e4b 100644 --- a/seminar/management/commands/save_org_permissions.py +++ b/seminar/management/commands/save_org_permissions.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from django.core.management.base import BaseCommand from django.contrib.sessions.models import Session from django.contrib.auth.models import Group, Permission diff --git a/seminar/management/commands/testdata.py b/seminar/management/commands/testdata.py index dbbd908d..d9ce8cfb 100644 --- a/seminar/management/commands/testdata.py +++ b/seminar/management/commands/testdata.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import datetime import os import random diff --git a/seminar/migrations/0001_initial.py b/seminar/migrations/0001_initial.py index 088193b3..cd36a7dc 100644 --- a/seminar/migrations/0001_initial.py +++ b/seminar/migrations/0001_initial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0002_add_body_views.py b/seminar/migrations/0002_add_body_views.py index 3d128ab9..1ece029e 100644 --- a/seminar/migrations/0002_add_body_views.py +++ b/seminar/migrations/0002_add_body_views.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0003_add_skola_zs_ss.py b/seminar/migrations/0003_add_skola_zs_ss.py index 1b1fbb80..478e49d3 100644 --- a/seminar/migrations/0003_add_skola_zs_ss.py +++ b/seminar/migrations/0003_add_skola_zs_ss.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0004_add_old_dakos_id.py b/seminar/migrations/0004_add_old_dakos_id.py index 1ec28943..769232cb 100644 --- a/seminar/migrations/0004_add_old_dakos_id.py +++ b/seminar/migrations/0004_add_old_dakos_id.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0005_alter_problem_autor.py b/seminar/migrations/0005_alter_problem_autor.py index d8a40585..d7763ecc 100644 --- a/seminar/migrations/0005_alter_problem_autor.py +++ b/seminar/migrations/0005_alter_problem_autor.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0006_problem_add_timestamp.py b/seminar/migrations/0006_problem_add_timestamp.py index fd1509de..dd5fd94c 100644 --- a/seminar/migrations/0006_problem_add_timestamp.py +++ b/seminar/migrations/0006_problem_add_timestamp.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0007_problem_zamereni.py b/seminar/migrations/0007_problem_zamereni.py index 10718bd7..d1363cde 100644 --- a/seminar/migrations/0007_problem_zamereni.py +++ b/seminar/migrations/0007_problem_zamereni.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0008_reseni_forma.py b/seminar/migrations/0008_reseni_forma.py index 399e81a9..22b36d43 100644 --- a/seminar/migrations/0008_reseni_forma.py +++ b/seminar/migrations/0008_reseni_forma.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0009_rename_imported_IDs.py b/seminar/migrations/0009_rename_imported_IDs.py index 997bc0ac..06eaf074 100644 --- a/seminar/migrations/0009_rename_imported_IDs.py +++ b/seminar/migrations/0009_rename_imported_IDs.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0010_alter_rok_maturity.py b/seminar/migrations/0010_alter_rok_maturity.py index 58c099fb..bfae4d5f 100644 --- a/seminar/migrations/0010_alter_rok_maturity.py +++ b/seminar/migrations/0010_alter_rok_maturity.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0011_alter_timestamp_def.py b/seminar/migrations/0011_alter_timestamp_def.py index 238386a6..90582816 100644 --- a/seminar/migrations/0011_alter_timestamp_def.py +++ b/seminar/migrations/0011_alter_timestamp_def.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0012_remove_soustredeni_ucastnici.py b/seminar/migrations/0012_remove_soustredeni_ucastnici.py index ddb61304..2011659c 100644 --- a/seminar/migrations/0012_remove_soustredeni_ucastnici.py +++ b/seminar/migrations/0012_remove_soustredeni_ucastnici.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0013_soustredeni_ucastnici_through_model.py b/seminar/migrations/0013_soustredeni_ucastnici_through_model.py index c725691d..944ae080 100644 --- a/seminar/migrations/0013_soustredeni_ucastnici_through_model.py +++ b/seminar/migrations/0013_soustredeni_ucastnici_through_model.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0014_uprava_poznamek.py b/seminar/migrations/0014_uprava_poznamek.py index 0eb34984..ee52c65b 100644 --- a/seminar/migrations/0014_uprava_poznamek.py +++ b/seminar/migrations/0014_uprava_poznamek.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0015_soustredeni_text.py b/seminar/migrations/0015_soustredeni_text.py index 87298eba..4f9ebd88 100644 --- a/seminar/migrations/0015_soustredeni_text.py +++ b/seminar/migrations/0015_soustredeni_text.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0016_texty_problemu.py b/seminar/migrations/0016_texty_problemu.py index 451c888e..0e91f010 100644 --- a/seminar/migrations/0016_texty_problemu.py +++ b/seminar/migrations/0016_texty_problemu.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0017_texty_problemu_minor.py b/seminar/migrations/0017_texty_problemu_minor.py index f732c111..cd3f2a1c 100644 --- a/seminar/migrations/0017_texty_problemu_minor.py +++ b/seminar/migrations/0017_texty_problemu_minor.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0018_problemnavrh_problemzadany.py b/seminar/migrations/0018_problemnavrh_problemzadany.py index afdcfa8c..42c448f9 100644 --- a/seminar/migrations/0018_problemnavrh_problemzadany.py +++ b/seminar/migrations/0018_problemnavrh_problemzadany.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0019_rocnik_ciselne.py b/seminar/migrations/0019_rocnik_ciselne.py index da9591aa..72055d18 100644 --- a/seminar/migrations/0019_rocnik_ciselne.py +++ b/seminar/migrations/0019_rocnik_ciselne.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0020_indexy_a_razeni.py b/seminar/migrations/0020_indexy_a_razeni.py index 1e199f0e..59674291 100644 --- a/seminar/migrations/0020_indexy_a_razeni.py +++ b/seminar/migrations/0020_indexy_a_razeni.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0021_cislo_verejna_vysledkovka.py b/seminar/migrations/0021_cislo_verejna_vysledkovka.py index d4d34c7f..19768357 100644 --- a/seminar/migrations/0021_cislo_verejna_vysledkovka.py +++ b/seminar/migrations/0021_cislo_verejna_vysledkovka.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0022_decimal_body.py b/seminar/migrations/0022_decimal_body.py index ff92fcde..22acbf99 100644 --- a/seminar/migrations/0022_decimal_body.py +++ b/seminar/migrations/0022_decimal_body.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals import importlib diff --git a/seminar/migrations/0023_add_novinky.py b/seminar/migrations/0023_add_novinky.py index 7db2a005..6e5db0c4 100644 --- a/seminar/migrations/0023_add_novinky.py +++ b/seminar/migrations/0023_add_novinky.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0024_add_organizator.py b/seminar/migrations/0024_add_organizator.py index 16faee72..4ce7a5e3 100644 --- a/seminar/migrations/0024_add_organizator.py +++ b/seminar/migrations/0024_add_organizator.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0025_zmena_cesty_nahravani_obrazku.py b/seminar/migrations/0025_zmena_cesty_nahravani_obrazku.py index 23e02c95..0d1ee7b4 100644 --- a/seminar/migrations/0025_zmena_cesty_nahravani_obrazku.py +++ b/seminar/migrations/0025_zmena_cesty_nahravani_obrazku.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0026_soustredeni_typ.py b/seminar/migrations/0026_soustredeni_typ.py index 46d3416f..3c97c387 100644 --- a/seminar/migrations/0026_soustredeni_typ.py +++ b/seminar/migrations/0026_soustredeni_typ.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0027_export_flag_a_typ_akce.py b/seminar/migrations/0027_export_flag_a_typ_akce.py index e7172dcc..e6616f36 100644 --- a/seminar/migrations/0027_export_flag_a_typ_akce.py +++ b/seminar/migrations/0027_export_flag_a_typ_akce.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0028_add_body_celkem_views.py b/seminar/migrations/0028_add_body_celkem_views.py index 0f6799f0..c26baec2 100644 --- a/seminar/migrations/0028_add_body_celkem_views.py +++ b/seminar/migrations/0028_add_body_celkem_views.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0029_fix_body_celkem_views.py b/seminar/migrations/0029_fix_body_celkem_views.py index 5e287747..b2b9f24a 100644 --- a/seminar/migrations/0029_fix_body_celkem_views.py +++ b/seminar/migrations/0029_fix_body_celkem_views.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0030_add_vysledky.py b/seminar/migrations/0030_add_vysledky.py index 06842c6b..65289e23 100644 --- a/seminar/migrations/0030_add_vysledky.py +++ b/seminar/migrations/0030_add_vysledky.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0031_cislo_pdf.py b/seminar/migrations/0031_cislo_pdf.py index c51570bf..b2b65102 100644 --- a/seminar/migrations/0031_cislo_pdf.py +++ b/seminar/migrations/0031_cislo_pdf.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0032_cislo_pdf_blank_typos.py b/seminar/migrations/0032_cislo_pdf_blank_typos.py index b16c4501..b72ad75d 100644 --- a/seminar/migrations/0032_cislo_pdf_blank_typos.py +++ b/seminar/migrations/0032_cislo_pdf_blank_typos.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0033_organizator_studuje_popisek.py b/seminar/migrations/0033_organizator_studuje_popisek.py index 07f15712..cc9f7e63 100644 --- a/seminar/migrations/0033_organizator_studuje_popisek.py +++ b/seminar/migrations/0033_organizator_studuje_popisek.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0034_reseni_forma_default_email.py b/seminar/migrations/0034_reseni_forma_default_email.py index 2d691b30..6cbe180c 100644 --- a/seminar/migrations/0034_reseni_forma_default_email.py +++ b/seminar/migrations/0034_reseni_forma_default_email.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0035_django_imagekit.py b/seminar/migrations/0035_django_imagekit.py index dd443018..ba18c7cc 100644 --- a/seminar/migrations/0035_django_imagekit.py +++ b/seminar/migrations/0035_django_imagekit.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0036_add_org_to_soustredeni.py b/seminar/migrations/0036_add_org_to_soustredeni.py index 4db43239..357cdf7b 100644 --- a/seminar/migrations/0036_add_org_to_soustredeni.py +++ b/seminar/migrations/0036_add_org_to_soustredeni.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations diff --git a/seminar/migrations/0037_prispevek.py b/seminar/migrations/0037_prispevek.py index c4c3b867..cb32f983 100644 --- a/seminar/migrations/0037_prispevek.py +++ b/seminar/migrations/0037_prispevek.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0038_change_meta_prispevek.py b/seminar/migrations/0038_change_meta_prispevek.py index 5378e57e..80a2bef5 100644 --- a/seminar/migrations/0038_change_meta_prispevek.py +++ b/seminar/migrations/0038_change_meta_prispevek.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0039_pohadka.py b/seminar/migrations/0039_pohadka.py index f798bd75..4636accc 100644 --- a/seminar/migrations/0039_pohadka.py +++ b/seminar/migrations/0039_pohadka.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0040_pohadka_nepovinny_autor.py b/seminar/migrations/0040_pohadka_nepovinny_autor.py index babf9b24..5be7ac80 100644 --- a/seminar/migrations/0040_pohadka_nepovinny_autor.py +++ b/seminar/migrations/0040_pohadka_nepovinny_autor.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0041_konfery.py b/seminar/migrations/0041_konfery.py index 9fddbe17..bb040465 100644 --- a/seminar/migrations/0041_konfery.py +++ b/seminar/migrations/0041_konfery.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0042_auto_20161005_0847.py b/seminar/migrations/0042_auto_20161005_0847.py index 27930952..e606e325 100644 --- a/seminar/migrations/0042_auto_20161005_0847.py +++ b/seminar/migrations/0042_auto_20161005_0847.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0042_cislo_faze.py b/seminar/migrations/0042_cislo_faze.py index 7d35ace5..0685e932 100644 --- a/seminar/migrations/0042_cislo_faze.py +++ b/seminar/migrations/0042_cislo_faze.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0043_uprava_faze.py b/seminar/migrations/0043_uprava_faze.py index 29e06e01..aff30bc3 100644 --- a/seminar/migrations/0043_uprava_faze.py +++ b/seminar/migrations/0043_uprava_faze.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0044_uprava_faze.py b/seminar/migrations/0044_uprava_faze.py index 0d683d6c..e05d56a8 100644 --- a/seminar/migrations/0044_uprava_faze.py +++ b/seminar/migrations/0044_uprava_faze.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0045_cislo_pridani_faze_nahrano.py b/seminar/migrations/0045_cislo_pridani_faze_nahrano.py index 06ca8201..a48db840 100644 --- a/seminar/migrations/0045_cislo_pridani_faze_nahrano.py +++ b/seminar/migrations/0045_cislo_pridani_faze_nahrano.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0046_merge.py b/seminar/migrations/0046_merge.py index 19352440..46496f5c 100644 --- a/seminar/migrations/0046_merge.py +++ b/seminar/migrations/0046_merge.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0047_auto_20170120_2118.py b/seminar/migrations/0047_auto_20170120_2118.py index 1876fe25..4486d786 100644 --- a/seminar/migrations/0047_auto_20170120_2118.py +++ b/seminar/migrations/0047_auto_20170120_2118.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0048_add_cislo_datum_deadline_soustredeni.py b/seminar/migrations/0048_add_cislo_datum_deadline_soustredeni.py index 134a00a8..71df4284 100644 --- a/seminar/migrations/0048_add_cislo_datum_deadline_soustredeni.py +++ b/seminar/migrations/0048_add_cislo_datum_deadline_soustredeni.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models diff --git a/seminar/migrations/0049_auto_20190430_2354.py b/seminar/migrations/0049_auto_20190430_2354.py index 14fa23d8..3fb7c437 100644 --- a/seminar/migrations/0049_auto_20190430_2354.py +++ b/seminar/migrations/0049_auto_20190430_2354.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-30 21:54 from __future__ import unicode_literals diff --git a/seminar/migrations/0050_auto_20190510_2228.py b/seminar/migrations/0050_auto_20190510_2228.py index a9afc764..86f2639b 100644 --- a/seminar/migrations/0050_auto_20190510_2228.py +++ b/seminar/migrations/0050_auto_20190510_2228.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-10 20:28 from __future__ import unicode_literals diff --git a/seminar/migrations/0051_resitel_to_osoba.py b/seminar/migrations/0051_resitel_to_osoba.py index 6644ab7d..81eab2d5 100644 --- a/seminar/migrations/0051_resitel_to_osoba.py +++ b/seminar/migrations/0051_resitel_to_osoba.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-10 20:44 from __future__ import unicode_literals diff --git a/seminar/migrations/0052_user_to_organizator.py b/seminar/migrations/0052_user_to_organizator.py index a91a7966..0577a0e0 100644 --- a/seminar/migrations/0052_user_to_organizator.py +++ b/seminar/migrations/0052_user_to_organizator.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-05-16 20:59 from __future__ import unicode_literals diff --git a/seminar/migrations/0053_organizator_organizuje_od_do.py b/seminar/migrations/0053_organizator_organizuje_od_do.py index b94e8032..b46b93de 100644 --- a/seminar/migrations/0053_organizator_organizuje_od_do.py +++ b/seminar/migrations/0053_organizator_organizuje_od_do.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-16 21:26 from __future__ import unicode_literals diff --git a/seminar/migrations/0055_smazat_nemigrovane_zastarale_veci.py b/seminar/migrations/0055_smazat_nemigrovane_zastarale_veci.py index 1b6f95f4..66eae38c 100644 --- a/seminar/migrations/0055_smazat_nemigrovane_zastarale_veci.py +++ b/seminar/migrations/0055_smazat_nemigrovane_zastarale_veci.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-23 20:16 from __future__ import unicode_literals diff --git a/seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py b/seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py index 56146261..4c755c48 100644 --- a/seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py +++ b/seminar/migrations/0056_vrcholy_pro_rocniky_a_cisla.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-23 21:54 from __future__ import unicode_literals diff --git a/seminar/migrations/0057_reseni_to_reseni_hodnoceni.py b/seminar/migrations/0057_reseni_to_reseni_hodnoceni.py index a11d99ae..9e162b94 100644 --- a/seminar/migrations/0057_reseni_to_reseni_hodnoceni.py +++ b/seminar/migrations/0057_reseni_to_reseni_hodnoceni.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-28 21:46 from __future__ import unicode_literals diff --git a/seminar/migrations/0058_problem_to_uloha_tema_clanek.py b/seminar/migrations/0058_problem_to_uloha_tema_clanek.py index 4ef135c4..f8fbc87b 100644 --- a/seminar/migrations/0058_problem_to_uloha_tema_clanek.py +++ b/seminar/migrations/0058_problem_to_uloha_tema_clanek.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-17 17:44 from __future__ import unicode_literals diff --git a/seminar/migrations/0059_vytvorit_pohadkanode.py b/seminar/migrations/0059_vytvorit_pohadkanode.py index 2a78c7ee..8aca874b 100644 --- a/seminar/migrations/0059_vytvorit_pohadkanode.py +++ b/seminar/migrations/0059_vytvorit_pohadkanode.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-29 03:26 from __future__ import unicode_literals diff --git a/seminar/migrations/0060_spoj_stromy.py b/seminar/migrations/0060_spoj_stromy.py index d0826ca1..6bf74f28 100644 --- a/seminar/migrations/0060_spoj_stromy.py +++ b/seminar/migrations/0060_spoj_stromy.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-29 03:26 from __future__ import unicode_literals diff --git a/seminar/migrations/0061_kill_frankenstein.py b/seminar/migrations/0061_kill_frankenstein.py index 0a367edf..80cde7a1 100644 --- a/seminar/migrations/0061_kill_frankenstein.py +++ b/seminar/migrations/0061_kill_frankenstein.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-29 03:29 from __future__ import unicode_literals diff --git a/seminar/migrations/0062_redukce_modelu_pohadky.py b/seminar/migrations/0062_redukce_modelu_pohadky.py index b4e5f11e..80bf280e 100644 --- a/seminar/migrations/0062_redukce_modelu_pohadky.py +++ b/seminar/migrations/0062_redukce_modelu_pohadky.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-30 01:16 from __future__ import unicode_literals diff --git a/seminar/migrations/0063_procisteni_migraci.py b/seminar/migrations/0063_procisteni_migraci.py index 3dce57ad..52f84179 100644 --- a/seminar/migrations/0063_procisteni_migraci.py +++ b/seminar/migrations/0063_procisteni_migraci.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-30 01:32 from __future__ import unicode_literals diff --git a/seminar/migrations/0064_auto_20190610_2358.py b/seminar/migrations/0064_auto_20190610_2358.py index 78e62862..8f1a90f4 100644 --- a/seminar/migrations/0064_auto_20190610_2358.py +++ b/seminar/migrations/0064_auto_20190610_2358.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-06-10 21:58 from __future__ import unicode_literals diff --git a/seminar/models/pomocne.py b/seminar/models/pomocne.py index cb552a67..9fc6b7cd 100644 --- a/seminar/models/pomocne.py +++ b/seminar/models/pomocne.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import logging import os from django.db import models diff --git a/seminar/models/treenode.py b/seminar/models/treenode.py index 735501c0..abc20eab 100644 --- a/seminar/models/treenode.py +++ b/seminar/models/treenode.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import logging from django.db import models diff --git a/seminar/models/tvorba.py b/seminar/models/tvorba.py index 4ef57bde..209008f5 100644 --- a/seminar/models/tvorba.py +++ b/seminar/models/tvorba.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import datetime import os import subprocess diff --git a/seminar/testutils.py b/seminar/testutils.py index 0d90456a..be7f3677 100644 --- a/seminar/testutils.py +++ b/seminar/testutils.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import datetime from django.contrib.auth.models import Permission diff --git a/seminar/utils.py b/seminar/utils.py index 7c009210..c826bf0b 100644 --- a/seminar/utils.py +++ b/seminar/utils.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import datetime import decimal diff --git a/soustredeni/models.py b/soustredeni/models.py index 78582565..518b3291 100644 --- a/soustredeni/models.py +++ b/soustredeni/models.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import logging import os -- 2.39.2 From 75344c2c3a23e499517f39d769db0ed4aca57858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 10:39:31 +0200 Subject: [PATCH 03/14] Kontroly codestylu nechceme --- _git_hooks/README.md | 16 ------------ _git_hooks/pre-commit | 30 --------------------- _git_hooks/update | 61 ------------------------------------------- 3 files changed, 107 deletions(-) delete mode 100644 _git_hooks/README.md delete mode 100755 _git_hooks/pre-commit delete mode 100755 _git_hooks/update diff --git a/_git_hooks/README.md b/_git_hooks/README.md deleted file mode 100644 index e74e5c53..00000000 --- a/_git_hooks/README.md +++ /dev/null @@ -1,16 +0,0 @@ -git hooks -========= - -Kontrola stylu pythoních zdrojáků pomocí flake8. Kontrolujeme jen změny, -abychom nenutili lidi dělat nesouvisející úpravy, které by rozbíjely historii -(git blame). - -pre-commit ----------- -* kontrola změn před commitnutím -* instalace: lokálně zkopírovat do .git/hooks (musí být spustitelný) - -update ------- -* kontrola změn přicházejících s pushem -* instalace: na atreyi zkopírovat do /akce/MaM/MaMweb/mamweb.git/hooks diff --git a/_git_hooks/pre-commit b/_git_hooks/pre-commit deleted file mode 100755 index f78840d4..00000000 --- a/_git_hooks/pre-commit +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# Git hook script to verify what is about to be committed. -# Checks that the changes don't introduce new flake8 errors. - -TMPDIFF=`tempfile` -FLAKE8="`git rev-parse --show-toplevel`/bin/flake8" - -status=0 - -# select only changed python files which are not migrations -changed=`git diff --cached --name-only | grep 'py$' | grep -v 'migrations/[0-9]'` -if [ -z $changed ] ; then - # Nothing to check. Note the exit is necessary -- we would not pass any - # paths to git diff below and it would output the diff unfiltered. - exit 0 -fi - -git diff --unified=1 --cached HEAD -- $changed > $TMPDIFF - -# only do the check when there are some changes to be commited -# otherwise flake8 would hang waiting for input -if [ -s $TMPDIFF ] ; then - cat $TMPDIFF | $FLAKE8 --diff - status=$? -fi - -rm -f $TMPDIFF - -exit $status diff --git a/_git_hooks/update b/_git_hooks/update deleted file mode 100755 index c700a1b1..00000000 --- a/_git_hooks/update +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -# git update hook to check that pushed changes don't introduce new flake8 -# errors - -# --- Command line -refname="$1" -oldrev="$2" -newrev="$3" - -# --- Safety check -if [ -z "$GIT_DIR" ]; then - echo "Don't run this script from the command line." >&2 - echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - - -TMPDIR=`mktemp -d` -TMPDIFF=`tempfile` - -[ $refname != "refs/heads/master" -a $refname != "refs/heads/stable" ] && exit 0 - -# select only changed python files which are not migrations -changed=`git diff --name-only $oldrev $newrev | grep 'py$' | grep -v 'migrations/[0-9]'` -if [ -z $changed ] ; then - # Nothing to check. Note the exit is necessary -- we would not pass any - # paths to git diff below and it would output the diff unfiltered. - exit 0 -fi - -git diff --unified=1 $oldrev $newrev -- $changed >${TMPDIFF} - -# there is no working tree in bare git repository, so we recreate it for flake8 -git archive $newrev | tar -x -C ${TMPDIR} - -cd ${TMPDIR} -# report only errors on lines in diff -# (if threre was flake8 installed on atrey, we could just call flake8) -/akce/MaM/WWW/mamweb-test/bin/flake8 --diff <${TMPDIFF} -status=$? -if [ $status != 0 ] ; then - echo - echo -n "Změny, které se snažíte pushnout, obsahují kód v pythonu " - echo -n "nevyhovující flake8 (viz výše). Opravte je a zkuste to znovu. " - echo -n "Nezapomeňte, že můžete editovat historii (git commit --amend, " - echo -n "git rebase -i). Pokud byste chybu příště raději odhalili už při " - echo "commitu, zkopírujte si pre-commit hook z _git_hooks do .git/hooks." - echo -fi - -rm -rf ${TMPDIR} -rm -f ${TMPDIFF} - -exit $status -- 2.39.2 From 7a6a7cb0f58b640b9448f6c4e352f8cd4ccaf830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 10:42:31 +0200 Subject: [PATCH 04/14] =?UTF-8?q?N=C3=A1vod=20na=20nahr=C3=A1t=C3=AD=20obr?= =?UTF-8?q?=C3=A1zk=C5=AF=20do=20odm=C4=9Bn=20(a=20jinak=20o=20flatpage)?= =?UTF-8?q?=20nem=C3=A1=20smysl=20m=C3=ADt=20v=20ko=C5=99enov=C3=A9=20slo?= =?UTF-8?q?=C5=BEce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {ilustrace_odmeny => docs}/jak_nahrat_do_flatpage | 1 + 1 file changed, 1 insertion(+) rename {ilustrace_odmeny => docs}/jak_nahrat_do_flatpage (82%) diff --git a/ilustrace_odmeny/jak_nahrat_do_flatpage b/docs/jak_nahrat_do_flatpage similarity index 82% rename from ilustrace_odmeny/jak_nahrat_do_flatpage rename to docs/jak_nahrat_do_flatpage index 7e88641d..2c4b208c 100644 --- a/ilustrace_odmeny/jak_nahrat_do_flatpage +++ b/docs/jak_nahrat_do_flatpage @@ -1,3 +1,4 @@ +FIXME přepsat do rst, přidat i další věci a případně přesunout na wiki 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 -- 2.39.2 From 081701213087ccd945cf1828b6e17be7fdcebdaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 10:55:03 +0200 Subject: [PATCH 05/14] =?UTF-8?q?Tahle=20moje=20=E2=80=9Edokumentace?= =?UTF-8?q?=E2=80=9C=20je=20k=20ni=C4=8Demu,=20ma=C5=BEu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aesop/apps.py | 3 --- aesop/urls.py | 7 ------- aesop/views.py | 5 ----- api/apps.py | 3 --- api/urls.py | 12 ------------ api/views/__init__.py | 5 ----- galerie/urls.py | 9 --------- header_fotky/admin.py | 13 +------------ header_fotky/apps.py | 3 --- header_fotky/models.py | 14 -------------- korektury/admin.py | 10 ---------- korektury/forms.py | 10 ---------- korektury/models.py | 14 -------------- korektury/urls.py | 8 -------- korektury/views.py | 5 ----- mamweb/urls.py | 15 +-------------- odevzdavatko/admin.py | 6 ------ odevzdavatko/apps.py | 3 --- odevzdavatko/urls.py | 14 -------------- personalni/apps.py | 3 --- personalni/urls.py | 14 -------------- prednasky/urls.py | 9 --------- seminar/urls.py | 31 ------------------------------- soustredeni/apps.py | 3 --- treenode/apps.py | 3 --- treenode/urls.py | 5 ----- various/apps.py | 3 --- various/autentizace/forms.py | 11 ----------- various/autentizace/urls.py | 13 ------------- vysledkovky/apps.py | 3 --- 30 files changed, 2 insertions(+), 255 deletions(-) diff --git a/aesop/apps.py b/aesop/apps.py index d7dea2e3..3974f084 100644 --- a/aesop/apps.py +++ b/aesop/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig class AesopConfig(AppConfig): diff --git a/aesop/urls.py b/aesop/urls.py index 946a873b..f39a0ba8 100644 --- a/aesop/urls.py +++ b/aesop/urls.py @@ -1,10 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- ``aesop-export/mam-rocnik-.csv`` (seminar_export_rocnik) :class:`~aesop.views.ExportRocnikView` -- ``aesop-export/mam-sous-.csv`` (seminar_export_sous) :class:`~aesop.views.ExportSousView` -- ``aesop-export/index.csv`` (seminar_export_index) :class:`~aesop.views.ExportIndexView` -""" from django.urls import path from aesop import views diff --git a/aesop/views.py b/aesop/views.py index e4b3364b..5fd49cbc 100644 --- a/aesop/views.py +++ b/aesop/views.py @@ -1,8 +1,3 @@ -""" -Soubor sloužící k deklaraci jednotlivých „views“ (nejčastěji funkce beroucí request -a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo -třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`) -""" import django from django.shortcuts import get_object_or_404 from django.http import HttpResponse diff --git a/api/apps.py b/api/apps.py index a74c8c0e..3800f6a9 100644 --- a/api/apps.py +++ b/api/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig diff --git a/api/urls.py b/api/urls.py index a3b5a4aa..9ff38424 100644 --- a/api/urls.py +++ b/api/urls.py @@ -1,15 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- ``api/expor/skoly/`` (export_skoly) :func:`~api.views.exports.exportSkolView` -- ``api/autocomplete/skola/`` (autocomplete_skola) :class:`~api.views.autocomplete.SkolaAutocomplete` -- ``api/autocomplete/resitel/`` (autocomplete_resitel) :class:`~api.views.autocomplete.ResitelAutocomplete` -- ``api/autocomplete/problem/odevzdatelny`` (autocomplete_problem_odevzdatelny) :class:`~api.views.autocomplete.OdevzdatelnyProblemAutocomplete` - -Na autocomplete v3 čeká: - -- ``autocomplete/organizatori/`` (seminar_autocomplete_organizator) :class:`~api.views.autocomplete.OrganizatorAutocomplete` -""" from django.urls import path from . import views from seminar.utils import org_required diff --git a/api/views/__init__.py b/api/views/__init__.py index 13ce91ba..fc00554e 100644 --- a/api/views/__init__.py +++ b/api/views/__init__.py @@ -1,7 +1,2 @@ -""" -Soubory sloužící k deklaraci jednotlivých „views“ (nejčastěji funkce beroucí request -a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo -třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`) -""" from .autocomplete import * from .exports import * diff --git a/galerie/urls.py b/galerie/urls.py index 2e311cd8..32824248 100644 --- a/galerie/urls.py +++ b/galerie/urls.py @@ -1,12 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- ``/`` :func:`~galerie.views.nahled` -- ``//`` :func:`~galerie.views.detail` -- ``/new/`` :func:`~galerie.views.new_galerie` -- ``/plus//`` :func:`~galerie.views.plus_galerie` -- ``/minus//`` :func:`~galerie.views.minus_galerie` -""" from django.urls import path from seminar.utils import org_required from . import views diff --git a/header_fotky/admin.py b/header_fotky/admin.py index b939541b..cfcb4d48 100644 --- a/header_fotky/admin.py +++ b/header_fotky/admin.py @@ -1,14 +1,3 @@ -""" -Soubor sloužící k definici toho, co bude v adminu. Většinou pouhým zavoláním -funkce :func:`django.contrib.admin.site.register`, v případě, že chceme něco -upravit, tak jako třída rozšiřující :class:`django.contrib.admin.ModelAdmin` -s dekorátorem :func:`django.contrib.admin.register`. - -Zde se definuje admin pro: - -- :class:`~header_fotky.models.FotkaHeader` -- :class:`~header_fotky.models.FotkaUrlVazba` -""" from django.contrib import admin from django.contrib.admin import ModelAdmin import header_fotky.models as m @@ -22,4 +11,4 @@ class FotkaPozadiAdmin(ModelAdmin): readonly_fields = ['cas'] admin.site.register(m.FotkaHeader, FotkaPozadiAdmin) -admin.site.register(m.FotkaUrlVazba) \ No newline at end of file +admin.site.register(m.FotkaUrlVazba) diff --git a/header_fotky/apps.py b/header_fotky/apps.py index 9cf572ec..6f9e5aee 100644 --- a/header_fotky/apps.py +++ b/header_fotky/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig diff --git a/header_fotky/models.py b/header_fotky/models.py index 750cc575..e48a743a 100644 --- a/header_fotky/models.py +++ b/header_fotky/models.py @@ -1,17 +1,3 @@ -""" -Tento soubor slouží k definici databázového modelu. - -Třídy rozšiřují většinou :class:`django.db.models.Model` a jejich atributy jsou -většinou sloupce v databázi (tj. nastaví se na hodnotu něčeho z :mod:`django.db.models`). -Na výběr jsou: - - - :class:`django.db.models.TextField` - - :class:`django.db.models.ForeignKey` - - :class:`django.db.models.DateField` - - :class:`django.db.models.DateTimeField` - - :class:`django.db.models.ImageField` - - :class:`django.db.models.CharField` -""" from django.core.exceptions import ValidationError from django.db import models from django.utils import timezone diff --git a/korektury/admin.py b/korektury/admin.py index 5f92c542..881a951c 100644 --- a/korektury/admin.py +++ b/korektury/admin.py @@ -1,13 +1,3 @@ -""" -Soubor sloužící k definici toho, co bude v adminu. Většinou pouhým zavoláním -funkce :func:`django.contrib.admin.site.register`, v případě, že chceme něco -upravit, tak jako třída rozšiřující :class:`django.contrib.admin.ModelAdmin` -s dekorátorem :func:`django.contrib.admin.register`. - -Zde se definuje admin pro: - -- :class:`korektury.models.KorekturovanePDF` -""" from django.contrib import admin from reversion.admin import VersionAdmin from korektury.models import KorekturovanePDF diff --git a/korektury/forms.py b/korektury/forms.py index 2fd439a6..22c82818 100644 --- a/korektury/forms.py +++ b/korektury/forms.py @@ -1,13 +1,3 @@ -""" -Formuláře (:class:`django.forms.Form`) umožňují jednoduchou tvorbu formulářů, -které lze pak jednoduše dát do frontendu i zpracovat na backendu. - -Pro přidání políčka do formuláře je potřeba - - mít v modelu tu položku, kterou chci upravovat - - přidat do views (prihlaskaView, resitelEditView) - - přidat do forms - - includovat do html -""" from django import forms class OpravaForm(forms.Form): diff --git a/korektury/models.py b/korektury/models.py index ca1bb877..153c4f3c 100644 --- a/korektury/models.py +++ b/korektury/models.py @@ -1,17 +1,3 @@ -""" -Tento soubor slouží k definici databázového modelu. - -Třídy rozšiřují většinou :class:`django.db.models.Model` a jejich atributy jsou -většinou sloupce v databázi (tj. nastaví se na hodnotu něčeho z :mod:`django.db.models`). -Na výběr jsou: - - - :class:`django.db.models.TextField` - - :class:`django.db.models.ForeignKey` - - :class:`django.db.models.DateField` - - :class:`django.db.models.DateTimeField` - - :class:`django.db.models.ImageField` - - :class:`django.db.models.CharField` -""" import os from django.db import models from django.utils import timezone diff --git a/korektury/urls.py b/korektury/urls.py index 96eb4dd4..dcd1d965 100644 --- a/korektury/urls.py +++ b/korektury/urls.py @@ -1,11 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- ``korektury/`` (korektury_list) :class:`~korektury.views.KorekturySeskupeneListView` -- ``korektury/neseskupene/`` (korektury_neseskupene_list) :class:`~korektury.views.KorekturyAktualniListView` -- ``korektury/zastarale/`` (korektury_stare_list) :class:`~korektury.views.KorekturyZastaraleListView` -- ``korektury//`` (korektury) :class:`~korektury.views.KorekturyView` -""" from django.urls import path from seminar.utils import org_required from . import views diff --git a/korektury/views.py b/korektury/views.py index 1bdfaa92..d5066af8 100644 --- a/korektury/views.py +++ b/korektury/views.py @@ -1,8 +1,3 @@ -""" -Soubor sloužící k deklaraci jednotlivých „views“ (nejčastěji funkce beroucí request -a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo -třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`) -""" from django.shortcuts import get_object_or_404, render from django.views import generic from django.conf import settings diff --git a/mamweb/urls.py b/mamweb/urls.py index cdd7df09..4b870fec 100644 --- a/mamweb/urls.py +++ b/mamweb/urls.py @@ -1,18 +1,5 @@ """ -Soubor sloužící jako základní „router“, tj. zde se includují veškeré ostatní urls: - -- ``admin/`` :mod:`django.contrib.admin.site.urls` -- ``ckeditor/`` :mod:`ckeditor_uploader.urls` -- :mod:`seminar.urls` -- :mod:`odevzdavatko.urls` -- :mod:`korektury.urls` -- :mod:`prednasky.urls` -- :mod:`soustredeni.urls` -- :mod:`personalni.urls` -- :mod:`various.autentizace.urls` -- :mod:`api.urls` -- :mod:`treenode.urls` -- :mod:`aesop.urls` +Soubor sloužící jako základní „router“, tj. zde se includují veškeré ostatní urls. """ from django.urls import path, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns diff --git a/odevzdavatko/admin.py b/odevzdavatko/admin.py index 168beab1..6048eb36 100644 --- a/odevzdavatko/admin.py +++ b/odevzdavatko/admin.py @@ -1,9 +1,3 @@ -""" -Soubor sloužící k definici toho, co bude v adminu. Většinou pouhým zavoláním -funkce :func:`django.contrib.admin.site.register`, v případě, že chceme něco -upravit, tak jako třída rozšiřující :class:`django.contrib.admin.ModelAdmin` -s dekorátorem :func:`django.contrib.admin.register`. -""" from django.contrib import admin from django_reverse_admin import ReverseModelAdmin import seminar.models as m diff --git a/odevzdavatko/apps.py b/odevzdavatko/apps.py index d20e4a5a..98c02c0b 100644 --- a/odevzdavatko/apps.py +++ b/odevzdavatko/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig diff --git a/odevzdavatko/urls.py b/odevzdavatko/urls.py index 6b021f2e..e41b9c14 100644 --- a/odevzdavatko/urls.py +++ b/odevzdavatko/urls.py @@ -1,17 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- ``org/add_solution`` (seminar_vloz_reseni) :class:`~odevzdavatko.views.PosliReseniView` -- ``resitel/nahraj_reseni`` (seminar_nahraj_reseni) :class:`~odevzdavatko.views.NahrajReseniView` -- ``resitel/odevzdana_reseni/`` (seminar_resitel_odevzdana_reseni) :class:`~odevzdavatko.views.PrehledOdevzdanychReseni` -- ``org/reseni/`` (odevzdavatko_tabulka) :class:`~odevzdavatko.views.TabulkaOdevzdanychReseniView` -- ``org/reseni/rocnik//`` (odevzdavatko_tabulka) :class:`~odevzdavatko.views.TabulkaOdevzdanychReseniView` -- ``org/reseni///`` (odevzdavatko_reseni_resitele_k_problemu) :class:`~odevzdavatko.views.ReseniProblemuView` -- ``org/reseni//`` (odevzdavatko_detail_reseni) :func:`~seminar.utils.viewMethodSwitch` + :class:`~odevzdavatko.views.DetailReseniView` + :func:`~odevzdavatko.views.hodnoceniReseniView` -- ``org/reseni/all`` :class:`~odevzdavatko.views.SeznamReseniView` -- ``org/reseni/akt`` :class:`~odevzdavatko.views.TabulkaOdevzdanychReseniView` -- ``resitel/reseni/`` (odevzdavatko_resitel_reseni) :class:`~odevzdavatko.views.ResitelReseniView` -""" from django.urls import path from seminar.utils import org_required, resitel_required, viewMethodSwitch, \ diff --git a/personalni/apps.py b/personalni/apps.py index a6ea47fa..8312e3ec 100644 --- a/personalni/apps.py +++ b/personalni/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig diff --git a/personalni/urls.py b/personalni/urls.py index cbcdb035..73a6f720 100644 --- a/personalni/urls.py +++ b/personalni/urls.py @@ -1,17 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- ``org/add_solution`` (seminar_vloz_reseni) :class:`~odevzdavatko.views.PosliReseniView` -- ``resitel/nahraj_reseni`` (seminar_nahraj_reseni) :class:`~odevzdavatko.views.NahrajReseniView` -- ``resitel/odevzdana_reseni/`` (seminar_resitel_odevzdana_reseni) :class:`~odevzdavatko.views.PrehledOdevzdanychReseni` -- ``org/reseni/`` (odevzdavatko_tabulka) :class:`~odevzdavatko.views.TabulkaOdevzdanychReseniView` -- ``org/reseni/rocnik//`` (odevzdavatko_tabulka) :class:`~odevzdavatko.views.TabulkaOdevzdanychReseniView` -- ``org/reseni///`` (odevzdavatko_reseni_resitele_k_problemu) :class:`~odevzdavatko.views.ReseniProblemuView` -- ``org/reseni//`` (odevzdavatko_detail_reseni) :func:`~seminar.utils.viewMethodSwitch` + :class:`~odevzdavatko.views.DetailReseniView` + :func:`~odevzdavatko.views.hodnoceniReseniView` -- ``org/reseni/all`` :class:`~odevzdavatko.views.SeznamReseniView` -- ``org/reseni/akt`` :class:`~odevzdavatko.views.TabulkaOdevzdanychReseniView` -- ``resitel/reseni/`` (odevzdavatko_resitel_reseni) :class:`~odevzdavatko.views.ResitelReseniView` -""" from django.urls import path from django.contrib.auth.decorators import login_required from . import views diff --git a/prednasky/urls.py b/prednasky/urls.py index d0e7a703..6b455163 100644 --- a/prednasky/urls.py +++ b/prednasky/urls.py @@ -1,12 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- ``prednasky/`` :func:`~prednasky.views.newPrednaska` -- ``prednasky/hotovo`` :func:`~prednasky.views.Prednaska_hotovo` -- ``prednasky/metaseznam_prednasek`` (metaseznam-list) :class:`~prednasky.views.MetaSeznamListView` -- ``prednasky/seznam_prednasek//export`` (seznam-export) :func:`~prednasky.views.SeznamExportView` -- ``prednasky/seznam_prednasek//`` (seznam-list) :class:`~prednasky.views.SeznamListView` -""" from django.urls import path from seminar.utils import org_required, resitel_or_org_required from . import views diff --git a/seminar/urls.py b/seminar/urls.py index f6f2e2fb..f740e6a4 100644 --- a/seminar/urls.py +++ b/seminar/urls.py @@ -1,34 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- Organizátoři - - ``o-nas/organizatori/`` (organizatori) :class:`~seminar.views.views_all.CojemamOrganizatoriView` - - ``o-nas/organizatori/organizovali/`` (stari_organizatori) :class:`~seminar.views.views_all.CojemamOrganizatoriStariView` -- Archiv - - ``archiv/rocniky/`` (seminar_archiv_rocniky) :class:`~seminar.views.views_all.ArchivView` - - ``archiv/temata/`` (seminar_archiv_temata) :class:`~seminar.views.views_all.ArchivTemataView` - - ``rocnik//`` (seminar_rocnik) :class:`~seminar.views.views_all.RocnikView` - - ``cislo/./`` (seminar_cislo) :class:`~seminar.views.views_all.CisloView` - - ``problem//`` (seminar_problem) :func:`~seminar.views.views_all.problemView` -- Zadání - - ``aktualni/zadani/`` (seminar_aktualni_zadani) :func:`~seminar.views.views_all.AktualniZadaniView` - - ``aktualni/vysledkova-listina/`` (seminar_aktualni_vysledky) :func:`~seminar.views.views_all.ZadaniAktualniVysledkovkaView` - - ``aktualni/rocnik/`` (seminar_aktualni_rocnik) :class:`~seminar.views.views_all.AktualniRocnikRedirectView` -- Články - - ``archiv/clanky/`` (clanky_resitel) :class:`~seminar.views.views_all.ClankyResitelView` -- Orgovské stránky - - ``rocnik//vysledkovka.tex`` (seminar_rocnik_vysledkovka) :class:`~seminar.views.views_all.RocnikVysledkovkaView` - - ``rocnik//resitele.csv`` (seminar_rocnik_resitele_csv) :func:`~seminar.views.views_all.resiteleRocnikuCsvExportView` - - ``cislo/./vysledkovka.tex`` (seminar_cislo_vysledkovka) :class:`~seminar.views.views_all.CisloVysledkovkaView` - - ``cislo/./obalky.pdf`` (seminar_cislo_obalky) :func:`~seminar.views.views_all.cisloObalkyView` - - ``cislo/./tituly.tex`` (seminar_cislo_titul) :func:`~seminar.views.views_all.TitulyView` - - ``stav`` (stav_databaze) :func:`~seminar.views.views_all.StavDatabazeView` - - ``cislo/./odmeny/./`` (seminar_archiv_odmeny) :class:`~seminar.views.views_all.OdmenyView` -- Další - - `` `` (titulni_strana) :class:`~seminar.views.views_all.TitulniStranaView` - - ``jak-resit/`` (jak_resit) :class:`~seminar.views.views_all.JakResitView` - - ``stare-novinky/`` (stare_novinky) :class:`~seminar.views.views_all.StareNovinkyView` -""" from django.urls import path, include, re_path from . import views from .utils import org_required diff --git a/soustredeni/apps.py b/soustredeni/apps.py index 3dd0b94e..90e25f5b 100644 --- a/soustredeni/apps.py +++ b/soustredeni/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig diff --git a/treenode/apps.py b/treenode/apps.py index 7e709e48..5a04a618 100644 --- a/treenode/apps.py +++ b/treenode/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig diff --git a/treenode/urls.py b/treenode/urls.py index 1b6444bb..60dc88ad 100644 --- a/treenode/urls.py +++ b/treenode/urls.py @@ -1,8 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- Zatím tu nic moc není… -""" from django.urls import path, re_path from . import views diff --git a/various/apps.py b/various/apps.py index d1f6ad2e..751fe3a6 100644 --- a/various/apps.py +++ b/various/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig diff --git a/various/autentizace/forms.py b/various/autentizace/forms.py index f3138d74..bf1ab597 100644 --- a/various/autentizace/forms.py +++ b/various/autentizace/forms.py @@ -1,14 +1,3 @@ -""" -Formuláře (:class:`django.forms.Form`) umožňují jednoduchou tvorbu formulářů, -které lze pak jednoduše dát do frontendu i zpracovat na backendu. - -Pro přidání políčka do formuláře je potřeba - - mít v modelu tu položku, kterou chci upravovat - - přidat do views (prihlaskaView, resitelEditView) - - přidat do forms - - includovat do html -""" - from django.contrib.auth.forms import AuthenticationForm from django.forms import BooleanField diff --git a/various/autentizace/urls.py b/various/autentizace/urls.py index a89ff89e..83c8e50e 100644 --- a/various/autentizace/urls.py +++ b/various/autentizace/urls.py @@ -1,16 +1,3 @@ -""" -Soubor sloužící jako „router“, tj. zde se definují url adresy a na co ukazují: - -- ``prihlasit/`` (login) :class:`~various.autentizace.views.LoginView` -- ``login/`` :class:`django.views.generic.base.RedirectView` předchozího -- ``odhlasit/`` (logout) :class:`~various.autentizace.views.LogoutView` -- ``logout/`` :class:`django.views.generic.base.RedirectView` předchozího -- ``reset-hesla/`` (reset_password) :class:`~various.autentizace.views.PasswordResetView` -- ``zmena-hesla/`` (change_password) :class:`~various.autentizace.views.PasswordChangeView` -- ``zmena-hesla/2/`` (reset_password_done) :class:`~various.autentizace.views.PasswordResetDoneView` -- ``reset-hesla/potvrzeni///`` (reset_password_confirm) :class:`~various.autentizace.views.PasswordResetConfirmView` -- ``reset-hesla/hotovo/`` (reset_password_complete) :class:`~various.autentizace.views.PasswordResetCompleteView` -""" from django.urls import path from . import views from django.views.generic.base import RedirectView diff --git a/vysledkovky/apps.py b/vysledkovky/apps.py index 7b9a1e0f..ef946395 100644 --- a/vysledkovky/apps.py +++ b/vysledkovky/apps.py @@ -1,6 +1,3 @@ -""" -Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace. -""" from django.apps import AppConfig -- 2.39.2 From 5f9bda9afe0d1487182113fa554268c718c42949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 10:56:51 +0200 Subject: [PATCH 06/14] =?UTF-8?q?Ha,=20tohle=20m=C4=9Blo=20smaz=C3=A1no=20?= =?UTF-8?q?b=C3=BDt=20u=C5=BE=20v=2075344c2c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/dalsi_soubory.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/dalsi_soubory.rst b/docs/dalsi_soubory.rst index 627a59d7..2b1a362b 100644 --- a/docs/dalsi_soubory.rst +++ b/docs/dalsi_soubory.rst @@ -9,12 +9,6 @@ static ------ Složka, kam django nakopíruje všechno ze složek static a pak na to z templatů / kódu jde ukazovat pomocí ``static``. -_git_hooks ----------- -Hooky do gitu pro kontrolu Pythoního stylu. Především ``flake8``. - -Zbylo tu z minulosti mamwebu. - data ---- Obsahuje data, která patří do databáze, ale jsou přímo součástí webu jako -- 2.39.2 From ead2a4ede352e9d09e935b8f607278f2ef8cb146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 11:04:19 +0200 Subject: [PATCH 07/14] =?UTF-8?q?Tahle=20middleware=20se=20v=C5=AFbec=20ne?= =?UTF-8?q?pou=C5=BE=C3=ADv=C3=A1=20(pou=C5=BE=C3=ADv=C3=A1=20se=20context?= =?UTF-8?q?processor=20vzhled)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/middleware.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/mamweb/middleware.py b/mamweb/middleware.py index 7109423e..208c6cbd 100644 --- a/mamweb/middleware.py +++ b/mamweb/middleware.py @@ -52,37 +52,3 @@ class LoggedInHintCookieMiddleware(object): if self.cookie_name in request.COOKIES: response.delete_cookie(self.cookie_name) return response - - -class vzhled: - - def process_request(self, request): - return None - - def process_view(self, request, view_func, view_args, view_kwargs): - #print "====== process_request ======" - #print view_func - #print view_args - #print view_kwargs - #print "=============================" - return None - - def process_template_response(self, request, response): - hodin = datetime.now().hour - if (hodin <= 6) or (hodin >= 14): # TODO 20 - response.context_data['noc'] = True - else: - response.context_data['noc'] = False - return response - - def process_response(self, request, response): - #hodin = datetime.now().hour - #if (hodin <= 6) or (hodin >= 14): # TODO 20 - #response.context_data['noc'] = True - #else: - #response.context_data['noc'] = False - return response - - - ##def process_exception(request, exception): - #pass -- 2.39.2 From e21a93f9e7bd063bd465dca98afa598dc86fd9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 11:06:00 +0200 Subject: [PATCH 08/14] =?UTF-8?q?Middleware=20=C5=99e=C5=A1=C3=ADc=C3=AD?= =?UTF-8?q?=20sessioh=20mezi=20http=20a=20https=20se=20u=C5=BE=20fakt=20dl?= =?UTF-8?q?ouho=20nepou=C5=BE=C3=ADv=C3=A1=20a=20nav=C3=ADc=20je=20toto=20?= =?UTF-8?q?t=C3=A9ma=20dnes=20d=C3=A1vno=20pas=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mamweb/middleware.py | 54 --------------------------------------- mamweb/settings_common.py | 3 --- 2 files changed, 57 deletions(-) delete mode 100644 mamweb/middleware.py diff --git a/mamweb/middleware.py b/mamweb/middleware.py deleted file mode 100644 index 208c6cbd..00000000 --- a/mamweb/middleware.py +++ /dev/null @@ -1,54 +0,0 @@ -from datetime import datetime, date - -from django.conf import settings -from django.http import HttpResponse, HttpResponseRedirect - - - -class LoggedInHintCookieMiddleware(object): - """Middleware to securely help with 'logged-in' detection for dual HTTP/HTTPS sites. - - On insecure requests: Checks for a (non-secure) cookie settings.LOGGED_IN_HINT_COOKIE_NAME - and if present, redirects to HTTPS (same adress). - Note this usually breaks non-GET (POST) requests. - - On secure requests: Updates cookie settings.LOGGED_IN_HINT_COOKIE_NAME to reflect - whether an user is logged in in the current session (cookie set to 'True' or cleared). - The cookie is set to expire at the same time as the sessionid cookie. - - By default, LOGGED_IN_HINT_COOKIE_NAME = 'logged_in_hint'. - """ - - def __init__(self): - if hasattr(settings, 'LOGGED_IN_HINT_COOKIE_NAME'): - self.cookie_name = settings.LOGGED_IN_HINT_COOKIE_NAME - else: self.cookie_name = 'logged_in_hint' - self.cookie_value = 'True' - - def cookie_correct(self, request): - return self.cookie_name in request.COOKIES and request.COOKIES[self.cookie_name] == self.cookie_value - - def process_request(self, request): - if not request.is_secure(): - if self.cookie_correct(request): - # redirect insecure (assuming http) requests with hint cookie to https - url = request.build_absolute_uri() - assert url[:5] == 'http:' - return HttpResponseRedirect('https:' + url[5:]) - return None - - def process_response(self, request, response): - if request.is_secure(): - # assuming full session info (as the conn. is secure) - try: - user = request.user - except AttributeError: # no user - ajax or other special request - return response - if user.is_authenticated(): - if not self.cookie_correct(request): - expiry = None if request.session.get_expire_at_browser_close() else request.session.get_expiry_date() - response.set_cookie(self.cookie_name, value=self.cookie_value, expires=expiry, secure=False) - else: - if self.cookie_name in request.COOKIES: - response.delete_cookie(self.cookie_name) - return response diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 92124364..4bc713c8 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -68,9 +68,6 @@ MIDDLEWARE = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', -# FIXME: rozbilo se při přechodu na Django 2.0, nevím, jestli -# se to dá zahodit bez náhrady -# 'mamweb.middleware.LoggedInHintCookieMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', -- 2.39.2 From 1d36cd076127413952a3c77f1c7debec40fbb1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 11:09:39 +0200 Subject: [PATCH 09/14] =?UTF-8?q?Tohle=20nastaven=C3=AD=20u=C5=BE=20je=20v?= =?UTF-8?q?=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- novinky/apps.py | 1 - seminar/apps.py | 1 - 2 files changed, 2 deletions(-) diff --git a/novinky/apps.py b/novinky/apps.py index 92519305..6aa7efe9 100644 --- a/novinky/apps.py +++ b/novinky/apps.py @@ -1,6 +1,5 @@ from django.apps import AppConfig class NovinkyConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' name = 'novinky' verbose_name = 'Novinky' diff --git a/seminar/apps.py b/seminar/apps.py index 161a73f8..ce66f627 100644 --- a/seminar/apps.py +++ b/seminar/apps.py @@ -1,7 +1,6 @@ from django.apps import AppConfig class SeminarConfig(AppConfig): - default_auto_field = 'django.db.models.BigAutoField' name = 'seminar' verbose_name = 'Seminář' -- 2.39.2 From 8fef21900c9d721152732068fb8d937c9a6c35be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 11:28:03 +0200 Subject: [PATCH 10/14] =?UTF-8?q?Autogenerovan=C3=A9=20koment=C3=A1=C5=99e?= =?UTF-8?q?=20a=20pr=C3=A1zdn=C3=A9=20testy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- korektury/admin.py | 1 - korektury/tests.py | 3 --- novinky/tests.py | 3 --- novinky/views.py | 3 --- prednasky/tests.py | 3 --- sifrovacka/admin.py | 2 -- sifrovacka/models.py | 3 --- sifrovacka/views.py | 2 -- various/admin.py | 2 -- various/views.py | 2 -- vyroci/admin.py | 2 -- vyroci/models.py | 2 -- vyroci/views.py | 2 -- 13 files changed, 30 deletions(-) delete mode 100644 korektury/tests.py delete mode 100644 novinky/tests.py delete mode 100644 prednasky/tests.py diff --git a/korektury/admin.py b/korektury/admin.py index 881a951c..a04026de 100644 --- a/korektury/admin.py +++ b/korektury/admin.py @@ -5,7 +5,6 @@ from korektury.models import KorekturovanePDF from django.core.mail import EmailMessage from django.urls import reverse -# Register your models here. class KorekturovanePDFAdmin(VersionAdmin): """ nastaví čas vložení (:attr:`~koretkury.models.KorekturovanePDF.cas`) a počet diff --git a/korektury/tests.py b/korektury/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/korektury/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/novinky/tests.py b/novinky/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/novinky/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/novinky/views.py b/novinky/views.py index 91ea44a2..e69de29b 100644 --- a/novinky/views.py +++ b/novinky/views.py @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/prednasky/tests.py b/prednasky/tests.py deleted file mode 100644 index 7ce503c2..00000000 --- a/prednasky/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/sifrovacka/admin.py b/sifrovacka/admin.py index 5099c241..ff980cd9 100644 --- a/sifrovacka/admin.py +++ b/sifrovacka/admin.py @@ -2,8 +2,6 @@ from django.contrib import admin from .models import OdpovedUcastnika, SpravnaOdpoved, NapovezenoUcastnikovi, Napoveda -# Register your models here. - admin.site.register(OdpovedUcastnika) admin.site.register(SpravnaOdpoved) admin.site.register(Napoveda) diff --git a/sifrovacka/models.py b/sifrovacka/models.py index 49565252..cd71fd15 100644 --- a/sifrovacka/models.py +++ b/sifrovacka/models.py @@ -4,9 +4,6 @@ from django.utils import timezone from personalni.models import Resitel -# Create your models here. - - class OdpovedUcastnika(models.Model): class Meta: ordering = ["-timestamp"] diff --git a/sifrovacka/views.py b/sifrovacka/views.py index 2ad352da..0bfa994f 100644 --- a/sifrovacka/views.py +++ b/sifrovacka/views.py @@ -7,8 +7,6 @@ from .models import OdpovedUcastnika, SpravnaOdpoved, Napoveda, NapovezenoUcastn from personalni.models import Resitel -# Create your views here. - class SifrovackaView(FormView): template_name = 'sifrovacka/sifrovacka.html' form_class = SifrovackaForm diff --git a/various/admin.py b/various/admin.py index 8c38f3f3..694323fa 100644 --- a/various/admin.py +++ b/various/admin.py @@ -1,3 +1 @@ from django.contrib import admin - -# Register your models here. diff --git a/various/views.py b/various/views.py index 96d9a29d..e344ff26 100644 --- a/various/views.py +++ b/various/views.py @@ -1,8 +1,6 @@ from django.http import HttpResponseForbidden from django.shortcuts import render -# Create your views here. - def csrf_error(request, reason=""): """ Jednoduchý „template view“ (třída to být nemůže) pro CSRF chyby """ diff --git a/vyroci/admin.py b/vyroci/admin.py index 7bf94bef..61476d24 100644 --- a/vyroci/admin.py +++ b/vyroci/admin.py @@ -2,6 +2,4 @@ from django.contrib import admin from .models import UcastnikVyroci -# Register your models here. - admin.site.register(UcastnikVyroci) diff --git a/vyroci/models.py b/vyroci/models.py index 04fd2097..28e0206a 100644 --- a/vyroci/models.py +++ b/vyroci/models.py @@ -1,7 +1,5 @@ from django.db import models -# Create your models here. - class UcastnikVyroci(models.Model): diff --git a/vyroci/views.py b/vyroci/views.py index a2f4767d..207ed619 100644 --- a/vyroci/views.py +++ b/vyroci/views.py @@ -6,8 +6,6 @@ from .forms import UcastnikVyrociForm from .models import UcastnikVyroci -# Create your views here. - class VyrociView(FormView): template_name = 'vyroci/vyroci.html' form_class = UcastnikVyrociForm -- 2.39.2 From 8dc3a2ba98ca138bcda04c5216368db9b6b5bd16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 11:50:14 +0200 Subject: [PATCH 11/14] =?UTF-8?q?Odstran=C4=9B=C5=88o=20star=C3=A9=20testo?= =?UTF-8?q?v=C3=A1n=C3=AD=20e-mail=C5=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- korektury/views.py | 7 ------- mamweb/settings_common.py | 4 ---- mamweb/settings_prod.py | 1 - mamweb/settings_test.py | 1 - seminar/models/tvorba.py | 3 --- 5 files changed, 16 deletions(-) diff --git a/korektury/views.py b/korektury/views.py index d5066af8..ee6f2841 100644 --- a/korektury/views.py +++ b/korektury/views.py @@ -194,13 +194,6 @@ class KorekturyView(generic.TemplateView): if email: emails.discard(email) - if not settings.POSLI_MAILOVOU_NOTIFIKACI: - print("Poslal bych upozornění na tyto adresy: ", " ".join(emails)) - print("---- Upozornění:") - print(text) - print("---- Konec upozornění") - return - EmailMessage( subject=subject, body=text, diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 4bc713c8..f737be1e 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -342,10 +342,6 @@ KOREKTURY_IMG_DIR = os.path.join('korektury', 'img') CISLO_IMG_DIR = os.path.join('cislo', 'img') -# E-MAIL NOTIFICATIONS -POSLI_MAILOVOU_NOTIFIKACI = False - - # Logování chyb class InvalidTemplateVariable(str): diff --git a/mamweb/settings_prod.py b/mamweb/settings_prod.py index 7d9c99e9..4a3f2198 100644 --- a/mamweb/settings_prod.py +++ b/mamweb/settings_prod.py @@ -68,5 +68,4 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/ # E-MAIL NOTIFICATIONS -POSLI_MAILOVOU_NOTIFIKACI = True LOCAL_TEST_PROD = "prod" diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py index 83c08b92..71f166ed 100644 --- a/mamweb/settings_test.py +++ b/mamweb/settings_test.py @@ -72,7 +72,6 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/ FILE_UPLOAD_PERMISSIONS = 0o440 # Testování e-mailů -POSLI_MAILOVOU_NOTIFIKACI = True EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend' # TODO Pouze na otestování testu… Zvolit konferu! # XXX: Je to pole, protože implementační detail backendu. diff --git a/seminar/models/tvorba.py b/seminar/models/tvorba.py index 209008f5..36157c96 100644 --- a/seminar/models/tvorba.py +++ b/seminar/models/tvorba.py @@ -284,9 +284,6 @@ class Cislo(SeminarModelBase): def posli(subject, text, resitele): emaily = map(lambda resitel: resitel.osoba.email, resitele) - if not settings.POSLI_MAILOVOU_NOTIFIKACI: - print("Poslal bych upozornění na tyto adresy: ", " ".join(emaily)) - return email = EmailMessage( subject=subject, -- 2.39.2 From f0b642ca4421bf0b87394f4fbbad7761f82e3d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 12:58:38 +0200 Subject: [PATCH 12/14] =?UTF-8?q?Nepou=C5=BE=C3=ADvan=C3=BD=20kus=20k?= =?UTF-8?q?=C3=B3du?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/admin.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/seminar/admin.py b/seminar/admin.py index deaba97f..f8768ddf 100644 --- a/seminar/admin.py +++ b/seminar/admin.py @@ -178,11 +178,6 @@ class TextAdminInline(admin.TabularInline): admin.site.register(m.Text) -class ResitelInline(admin.TabularInline): - model = m.Resitel - extra = 1 - - # admin.site.register(m.Pohadka) admin.site.register(m.Obrazek) admin.site.register(m.Nastaveni, SingletonModelAdmin) -- 2.39.2 From 69635b42348e24b328b138d6f5ce08d1caa278bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 13:01:10 +0200 Subject: [PATCH 13/14] TODO jsou v kanboardu --- galerie/TODO | 25 ------------------------- korektury/TODO | 11 ----------- 2 files changed, 36 deletions(-) delete mode 100644 galerie/TODO delete mode 100644 korektury/TODO diff --git a/galerie/TODO b/galerie/TODO deleted file mode 100644 index c8afd3c4..00000000 --- a/galerie/TODO +++ /dev/null @@ -1,25 +0,0 @@ -======== -| TODO | -|======| - -Aktualni -* co s titulni fotkou -* do CSS - * nahledy - * nastylovat tabulku s nahledy - * komentare uz na nahledy? - * detail - * nahledy pred a po - * opravit prechodove sipky - * vyrobit prechodove sipky ve M&M-stylu - -Dlouhodobe -* sipky na prechazeni mezi fotkami -* hromadne PRIDANI fotek do jiz existujici galerie - -Fylozoficke -* zvolit velikosti velke a male fotky -* je potreba i jine razeni nez automaticky podle casu nebo staci podgalerie? - * napr. dve hry na dvou ruznych mistech ve stejny cas - * fotky od ucastniku ze hry (skupinky se pohybuji ve stejny cas, ale maji sled fotek) -- nestaci to pripadne vrazit do podgalerii? - diff --git a/korektury/TODO b/korektury/TODO deleted file mode 100644 index df1b937a..00000000 --- a/korektury/TODO +++ /dev/null @@ -1,11 +0,0 @@ -- korektura potrebuje reakci -+ komentáře fixně na username - - používat skutečné jméno? -- vyžádat pozornost autora obsahu -- zvednout upload limit na 5MB -- sbalit a rozbalit korekturu -- nahrávání jiných věcí než PDF - kontrolovat? -- stylování -- seznam PDF - co zobrazovat? - - -- 2.39.2 From 431978e6267d86e2743dbeb7d31d54aa04fd0b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 3 Aug 2024 13:03:09 +0200 Subject: [PATCH 14/14] =?UTF-8?q?Star=C3=BD=20kus=20k=C3=B3du,=20kter?= =?UTF-8?q?=C3=BD=20by=20se=20mohl=20hodit,=20ale=20je=20p=C5=99=C3=AD?= =?UTF-8?q?=C5=A1ern=C4=9B=20zastaral=C3=BD=20(ObrazekAutocomplete)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- galerie/autocomplete_light_registry.py.old | 45 ---------------------- 1 file changed, 45 deletions(-) delete mode 100644 galerie/autocomplete_light_registry.py.old diff --git a/galerie/autocomplete_light_registry.py.old b/galerie/autocomplete_light_registry.py.old deleted file mode 100644 index 8a0c5952..00000000 --- a/galerie/autocomplete_light_registry.py.old +++ /dev/null @@ -1,45 +0,0 @@ -from autocomplete_light import shortcuts as autocomplete_light - -from .models import Obrazek, Galerie -from .views import cesta_od_korene - - -class ObrazekAutocomplete(autocomplete_light.AutocompleteModelBase): - - model = Obrazek - search_fields = ['nazev', 'popis'] - split_words = True - limit_choices = 15 - attrs = { - # This will set the input placeholder attribute: - 'placeholder': u'Obrázek', - # This will set the yourlabs.Autocomplete.minimumCharacters - # options, the naming conversion is handled by jQuery - 'data-autocomplete-minimum-characters': 1, - } - - choice_html_format = ''' - - - {} - {} - - - ''' - - def choice_label(self, obrazek): - cesta = "/".join(g.nazev for g in cesta_od_korene(obrazek.galerie)) - popis = "{}
".format(obrazek.popis) if obrazek.popis else "" - return '{}
{}{}'.format(obrazek.nazev, popis, cesta) - - def choice_html(self, obrazek): - """Vrátí kus html i s obrázkem, které se pak ukazuje v nabídce""" - return self.choice_html_format.format(self.choice_value(obrazek), - obrazek.obrazek_maly_tag(), self.choice_label(obrazek)) - - widget_attrs={ - 'data-widget-maximum-values': 15, - 'class': 'modern-style', - } - -autocomplete_light.register(ObrazekAutocomplete) -- 2.39.2