Přesun kódu modelů tvorby

This commit is contained in:
Jonas Havelka 2023-08-09 17:11:20 +02:00
parent 2b52ec028e
commit 115589e770
31 changed files with 30 additions and 31 deletions

View file

@ -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

View file

@ -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 *

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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):

View file

@ -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

View file

@ -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

View file

@ -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):

View file

@ -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):

View file

@ -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):

View file

@ -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):

View file

@ -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):

View file

@ -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):

View file

@ -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):

View file

@ -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):

View file

@ -1,4 +1,3 @@
from .tvorba import *
from .odevzdavatko import *
from .base import *
from .soustredeni import *

View file

@ -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)

View file

@ -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

View file

@ -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__)

View file

@ -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:

View file

@ -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):

View file

@ -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 *

View file

@ -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

View file

@ -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):

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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__)

View file

@ -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