diff --git a/api/views/autocomplete.py b/api/views/autocomplete.py index 724f2ced..3bf4341b 100644 --- a/api/views/autocomplete.py +++ b/api/views/autocomplete.py @@ -6,7 +6,7 @@ from django.shortcuts import get_object_or_404 from django.db.models import Q from personalni.models import Skola, Resitel -from seminar.models.tvorba import Problem +from tvorba.models import Problem from seminar.models.nastaveni import Nastaveni from .helpers import LoginRequiredAjaxMixin diff --git a/odevzdavatko/forms.py b/odevzdavatko/forms.py index 83e69fbd..dcf4f95d 100644 --- a/odevzdavatko/forms.py +++ b/odevzdavatko/forms.py @@ -5,7 +5,7 @@ from django.forms.models import inlineformset_factory from django.utils import timezone from personalni.models import Resitel -from seminar.models.tvorba import Problem, Deadline +from tvorba.models import Problem, Deadline from seminar.models.nastaveni import Nastaveni from seminar.models.odevzdavatko import * diff --git a/odevzdavatko/views.py b/odevzdavatko/views.py index 82a3dd00..87f3be55 100644 --- a/odevzdavatko/views.py +++ b/odevzdavatko/views.py @@ -17,7 +17,7 @@ from itertools import groupby import logging from seminar.models.odevzdavatko import * -from seminar.models.tvorba import Problem, Rocnik, Deadline +from tvorba.models import Problem, Rocnik, Deadline from seminar.models.nastaveni import Nastaveni from personalni.models import Resitel, Organizator, Osoba from . import forms as f diff --git a/personalni/views.py b/personalni/views.py index 6720dd7c..ae42e328 100644 --- a/personalni/views.py +++ b/personalni/views.py @@ -11,7 +11,7 @@ from django.http import HttpResponse from seminar.models.odevzdavatko import Hodnoceni from .models import * -from seminar.models.tvorba import Tema, Uloha, Clanek +from tvorba.models import Tema, Uloha, Clanek from seminar.models.nastaveni import Nastaveni from seminar.models.soustredeni import Soustredeni from .forms import PrihlaskaForm, ProfileEditForm, PoMaturiteProfileEditForm diff --git a/seminar/admin.py b/seminar/admin.py index d078eace..ed88d24a 100644 --- a/seminar/admin.py +++ b/seminar/admin.py @@ -9,7 +9,7 @@ from django.utils.safestring import mark_safe # Todo: reversion -from seminar.models.tvorba import Rocnik, Cislo, Deadline, ZmrazenaVysledkovka, Problem, Uloha, Tema, Clanek +from tvorba.models import Rocnik, Cislo, Deadline, ZmrazenaVysledkovka, Problem, Uloha, Tema, Clanek from seminar.models.nastaveni import Nastaveni from personalni.models import Resitel from seminar.models.soustredeni import Konfera diff --git a/seminar/management/commands/generate_thumbnails.py b/seminar/management/commands/generate_thumbnails.py index 3c3ddcae..77d8a135 100644 --- a/seminar/management/commands/generate_thumbnails.py +++ b/seminar/management/commands/generate_thumbnails.py @@ -1,6 +1,6 @@ from django.core.management.base import BaseCommand -from seminar.models.tvorba import Cislo +from tvorba.models import Cislo from subprocess import CalledProcessError import logging diff --git a/seminar/management/commands/pregeneruj_zmrazene_vysledkovky.py b/seminar/management/commands/pregeneruj_zmrazene_vysledkovky.py index 09586a4f..ba3f3103 100644 --- a/seminar/management/commands/pregeneruj_zmrazene_vysledkovky.py +++ b/seminar/management/commands/pregeneruj_zmrazene_vysledkovky.py @@ -1,5 +1,5 @@ from django.core.management.base import BaseCommand -from seminar.models.tvorba import Deadline +from tvorba.models import Deadline class Command(BaseCommand): diff --git a/seminar/management/commands/testdata.py b/seminar/management/commands/testdata.py index 5297e9ed..f95721ff 100644 --- a/seminar/management/commands/testdata.py +++ b/seminar/management/commands/testdata.py @@ -8,7 +8,7 @@ from django.core.management import call_command from django.conf import settings from personalni.models import Skola, Resitel -from seminar.models.tvorba import Rocnik, Cislo, Problem +from tvorba.models import Rocnik, Cislo, Problem from seminar.models.odevzdavatko import Reseni from seminar.testutils import create_test_data import django.contrib.auth diff --git a/seminar/migrations/0001_squashed_0098_auto_20210906_0305.py b/seminar/migrations/0001_squashed_0098_auto_20210906_0305.py index da569e4f..8fa575eb 100644 --- a/seminar/migrations/0001_squashed_0098_auto_20210906_0305.py +++ b/seminar/migrations/0001_squashed_0098_auto_20210906_0305.py @@ -9,7 +9,7 @@ import django_countries.fields import imagekit.models.fields from seminar.models.odevzdavatko import generate_filename from seminar.models.soustredeni import generate_filename_konfera -from seminar.models.tvorba import cislo_pdf_filename, cislo_png_filename +from tvorba.models import cislo_pdf_filename, cislo_png_filename import taggit.managers from datetime import date diff --git a/seminar/migrations/0031_cislo_pdf.py b/seminar/migrations/0031_cislo_pdf.py index e2ec62e8..8392a581 100644 --- a/seminar/migrations/0031_cislo_pdf.py +++ b/seminar/migrations/0031_cislo_pdf.py @@ -1,7 +1,7 @@ from __future__ import unicode_literals from django.db import models, migrations -from seminar.models.tvorba import cislo_pdf_filename +from tvorba.models import cislo_pdf_filename class Migration(migrations.Migration): diff --git a/seminar/migrations/0032_cislo_pdf_blank_typos.py b/seminar/migrations/0032_cislo_pdf_blank_typos.py index 709e4f67..bbfcac1e 100644 --- a/seminar/migrations/0032_cislo_pdf_blank_typos.py +++ b/seminar/migrations/0032_cislo_pdf_blank_typos.py @@ -2,7 +2,7 @@ from __future__ import unicode_literals from django.db import models, migrations import django_countries.fields -from seminar.models.tvorba import cislo_pdf_filename +from tvorba.models import cislo_pdf_filename class Migration(migrations.Migration): diff --git a/seminar/migrations/0081_auto_20200408_2221.py b/seminar/migrations/0081_auto_20200408_2221.py index f6b7a36a..eb95bf40 100644 --- a/seminar/migrations/0081_auto_20200408_2221.py +++ b/seminar/migrations/0081_auto_20200408_2221.py @@ -1,7 +1,7 @@ # Generated by Django 2.2.9 on 2020-04-08 20:21 from django.db import migrations, models -from seminar.models.tvorba import cislo_pdf_filename +from tvorba.models import cislo_pdf_filename class Migration(migrations.Migration): diff --git a/seminar/migrations/0082_auto_20200506_1951.py b/seminar/migrations/0082_auto_20200506_1951.py index ae45a25e..99ef70e9 100644 --- a/seminar/migrations/0082_auto_20200506_1951.py +++ b/seminar/migrations/0082_auto_20200506_1951.py @@ -1,7 +1,7 @@ # Generated by Django 2.2.12 on 2020-05-06 17:51 from django.db import migrations, models -from seminar.models.tvorba import cislo_png_filename +from tvorba.models import cislo_png_filename class Migration(migrations.Migration): diff --git a/seminar/migrations/0100_auto_20211129_2354.py b/seminar/migrations/0100_auto_20211129_2354.py index 2c501814..fa5c818d 100644 --- a/seminar/migrations/0100_auto_20211129_2354.py +++ b/seminar/migrations/0100_auto_20211129_2354.py @@ -1,7 +1,7 @@ # Generated by Django 2.2.24 on 2021-11-29 22:54 from django.db import migrations, models -from seminar.models.tvorba import cislo_pdf_filename, OverwriteStorage +from tvorba.models import cislo_pdf_filename, OverwriteStorage class Migration(migrations.Migration): diff --git a/seminar/migrations/0103_deadline.py b/seminar/migrations/0103_deadline.py index a406615f..ba24df13 100644 --- a/seminar/migrations/0103_deadline.py +++ b/seminar/migrations/0103_deadline.py @@ -5,7 +5,7 @@ from django.db import migrations, models import django.db.models.deletion from django.utils import timezone -from seminar.models.tvorba import Deadline as mDeadline +from tvorba.models import Deadline as mDeadline def vytvor_deadliny(apps, schema_editor): diff --git a/seminar/migrations/0105_odstraneni_deadlinu_cisla.py b/seminar/migrations/0105_odstraneni_deadlinu_cisla.py index cc5672c7..262de179 100644 --- a/seminar/migrations/0105_odstraneni_deadlinu_cisla.py +++ b/seminar/migrations/0105_odstraneni_deadlinu_cisla.py @@ -1,7 +1,7 @@ # Generated by Django 3.2.15 on 2022-10-09 10:14 from django.db import migrations -from seminar.models.tvorba import Deadline +from tvorba.models import Deadline def vrat_deadliny(apps, schema_editor): diff --git a/seminar/migrations/0106_remove_cislo_verejna_vysledkovka.py b/seminar/migrations/0106_remove_cislo_verejna_vysledkovka.py index c25217c2..e9e652b3 100644 --- a/seminar/migrations/0106_remove_cislo_verejna_vysledkovka.py +++ b/seminar/migrations/0106_remove_cislo_verejna_vysledkovka.py @@ -1,7 +1,7 @@ # Generated by Django 3.2.15 on 2022-10-09 11:04 from django.db import migrations -from seminar.models.tvorba import Deadline +from tvorba.models import Deadline def vrat_verejnost(apps, schema_editor): diff --git a/seminar/models/__init__.py b/seminar/models/__init__.py index 40fb3857..11402ea9 100644 --- a/seminar/models/__init__.py +++ b/seminar/models/__init__.py @@ -1,4 +1,3 @@ -from .tvorba import * from .odevzdavatko import * from .base import * from .soustredeni import * diff --git a/seminar/models/nastaveni.py b/seminar/models/nastaveni.py index abfb4f4b..09e74e8c 100644 --- a/seminar/models/nastaveni.py +++ b/seminar/models/nastaveni.py @@ -3,7 +3,7 @@ from django.urls import reverse from reversion import revisions as reversion from solo.models import SingletonModel -from seminar.models.tvorba import Cislo +from tvorba.models import Cislo @reversion.register(ignore_duplicates=True) diff --git a/seminar/models/odevzdavatko.py b/seminar/models/odevzdavatko.py index e57d4722..6144bd55 100644 --- a/seminar/models/odevzdavatko.py +++ b/seminar/models/odevzdavatko.py @@ -9,7 +9,7 @@ from django.urls import reverse_lazy from django.utils import timezone from django.conf import settings -from seminar.models.tvorba import Cislo, Deadline, Problem, Uloha, aux_generate_filename +from tvorba.models import Cislo, Deadline, Problem, Uloha, aux_generate_filename from personalni.models import Resitel from seminar.models.base import SeminarModelBase diff --git a/seminar/models/soustredeni.py b/seminar/models/soustredeni.py index a20c25a2..0a798e8d 100644 --- a/seminar/models/soustredeni.py +++ b/seminar/models/soustredeni.py @@ -10,7 +10,7 @@ from django.conf import settings from personalni.models import Resitel, Organizator from .base import SeminarModelBase -from seminar.models.tvorba import Rocnik, Problem, aux_generate_filename +from tvorba.models import Rocnik, Problem, aux_generate_filename logger = logging.getLogger(__name__) diff --git a/seminar/models/treenode.py b/seminar/models/treenode.py index 04d668dc..a3892322 100644 --- a/seminar/models/treenode.py +++ b/seminar/models/treenode.py @@ -15,7 +15,7 @@ from .pomocne import Text logger = logging.getLogger(__name__) -from seminar.models.tvorba import Rocnik, Cislo, Tema, Uloha, Pohadka +from tvorba.models import Rocnik, Cislo, Tema, Uloha, Pohadka class TreeNode(PolymorphicModel): class Meta: diff --git a/seminar/templatetags/deadliny.py b/seminar/templatetags/deadliny.py index f90f0e69..837efcc0 100644 --- a/seminar/templatetags/deadliny.py +++ b/seminar/templatetags/deadliny.py @@ -1,7 +1,7 @@ from django import template from django.utils.safestring import mark_safe register = template.Library() -from seminar.models.tvorba import Deadline +from tvorba.models import Deadline @register.filter(name='deadline_kratseji') def deadline_kratsi_text(deadline: Deadline): diff --git a/seminar/testutils.py b/seminar/testutils.py index 354db259..33bc4d1f 100644 --- a/seminar/testutils.py +++ b/seminar/testutils.py @@ -14,7 +14,7 @@ import logging from korektury.testutils import create_test_pdf from models.nastaveni import * from personalni.models import * -from seminar.models.tvorba import * +from tvorba.models import * from seminar.models.odevzdavatko import * from seminar.models.soustredeni import * from seminar.models.novinky import * diff --git a/seminar/utils.py b/seminar/utils.py index 8c32ae33..5e0447fd 100644 --- a/seminar/utils.py +++ b/seminar/utils.py @@ -17,7 +17,7 @@ from django.core.exceptions import ObjectDoesNotExist import logging from personalni.models import Organizator, Resitel, Skola, Prijemce -from seminar.models.tvorba import Clanek, Rocnik +from tvorba.models import Clanek, Rocnik from seminar.models.treenode import CisloNode from seminar.models.soustredeni import Konfery_Ucastnici, Soustredeni_Ucastnici from seminar.models.odevzdavatko import Reseni_Resitele diff --git a/seminar/views/docasne.py b/seminar/views/docasne.py index 2c817ece..453a14f0 100644 --- a/seminar/views/docasne.py +++ b/seminar/views/docasne.py @@ -5,7 +5,7 @@ from django.db import transaction from django.forms import Form, CharField, IntegerField from django.views.generic import FormView -from seminar.models.tvorba import Cislo, Problem, Tema, Uloha +from tvorba.models import Cislo, Problem, Tema, Uloha from django.shortcuts import render, get_object_or_404 def problemView(request, pk): diff --git a/seminar/views/views_all.py b/seminar/views/views_all.py index e1de4829..3e574155 100644 --- a/seminar/views/views_all.py +++ b/seminar/views/views_all.py @@ -9,7 +9,7 @@ from django.db.models import Q, Sum, Count from django.views.generic.base import RedirectView from django.core.exceptions import PermissionDenied -from seminar.models.tvorba import Rocnik, Cislo, Deadline, Problem, Tema, Clanek +from tvorba.models import Rocnik, Cislo, Deadline, Problem, Tema, Clanek from seminar.models.nastaveni import Nastaveni from personalni.models import Resitel, Organizator from seminar.models.novinky import Novinky diff --git a/treenode/serializers.py b/treenode/serializers.py index 27a8ac82..08adc925 100644 --- a/treenode/serializers.py +++ b/treenode/serializers.py @@ -4,7 +4,7 @@ from rest_polymorphic.serializers import PolymorphicSerializer from seminar.models.treenode import * from seminar.models.pomocne import Text from seminar.models.odevzdavatko import Reseni -from seminar.models.tvorba import Problem, Uloha +from tvorba.models import Problem, Uloha from treenode import treelib DEFAULT_NODE_DEPTH = 2 diff --git a/treenode/viewsets.py b/treenode/viewsets.py index 7816efbe..4c78d472 100644 --- a/treenode/viewsets.py +++ b/treenode/viewsets.py @@ -4,7 +4,7 @@ from rest_framework.response import Response from django.core.exceptions import PermissionDenied from rest_framework.permissions import BasePermission, AllowAny from seminar.models.treenode import * -from seminar.models.tvorba import Problem, Uloha +from tvorba.models import Problem, Uloha from seminar.models.odevzdavatko import Reseni import treenode.serializers as views diff --git a/seminar/models/tvorba.py b/tvorba/models.py similarity index 99% rename from seminar/models/tvorba.py rename to tvorba/models.py index c825b4f5..42979838 100644 --- a/seminar/models/tvorba.py +++ b/tvorba/models.py @@ -33,7 +33,7 @@ from django.core.mail import EmailMessage from personalni.models import Prijemce, Organizator -from .base import SeminarModelBase +from seminar.models.base import SeminarModelBase logger = logging.getLogger(__name__) diff --git a/vysledkovky/utils.py b/vysledkovky/utils.py index 79dd4a3e..15055678 100644 --- a/vysledkovky/utils.py +++ b/vysledkovky/utils.py @@ -2,7 +2,7 @@ import abc from functools import cached_property from typing import Union, Iterable # TODO: s pythonem 3.10 přepsat na '|' -from seminar.models.tvorba import Rocnik, Cislo, Deadline, Problem, Clanek +from tvorba.models import Rocnik, Cislo, Deadline, Problem, Clanek from seminar.models.odevzdavatko import Hodnoceni from personalni.models import Resitel from seminar.models.soustredeni import Konfera