From 9b14e4a333380a6a7d8550a05f858b490c55a95a Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Sun, 3 Nov 2024 01:46:18 +0100 Subject: [PATCH] =?UTF-8?q?Treenode:=20=C5=BE=C3=A1dn=C3=A9=20pomocn=C3=A9?= =?UTF-8?q?=20treenody=20nebudou.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- treenode/admin.py | 2 +- treenode/forms.py | 2 +- treenode/models/__init__.py | 1 - treenode/models/pomocne.py | 1 - treenode/serializers.py | 2 +- treenode/views.py | 2 +- treenode/viewsets.py | 2 +- tvorba/testutils.py | 2 +- 8 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 treenode/models/__init__.py delete mode 100644 treenode/models/pomocne.py diff --git a/treenode/admin.py b/treenode/admin.py index 6f3bfadb..fb8a8781 100644 --- a/treenode/admin.py +++ b/treenode/admin.py @@ -5,7 +5,7 @@ from django.forms import widgets from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin, PolymorphicChildModelFilter from .models import TreeNode, RocnikNode, CisloNode, MezicisloNode, TemaVCisleNode, UlohaZadaniNode, PohadkaNode, UlohaVzorakNode, TextNode, CastNode, OrgTextNode -from .models.pomocne import Text, Obrazek +from .models import Text, Obrazek # Polymorfismus pro stromy # TODO: Inlines podle https://django-polymorphic.readthedocs.io/en/stable/admin.html diff --git a/treenode/forms.py b/treenode/forms.py index 61243720..12ef293b 100644 --- a/treenode/forms.py +++ b/treenode/forms.py @@ -1,5 +1,5 @@ from django import forms -from .models.pomocne import Obrazek +from .models import Obrazek # pro přidání políčka do formuláře je potřeba # - mít v modelu tu položku, kterou chci upravovat diff --git a/treenode/models/__init__.py b/treenode/models/__init__.py deleted file mode 100644 index 36b2521c..00000000 --- a/treenode/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from seminar.models.treenode import * diff --git a/treenode/models/pomocne.py b/treenode/models/pomocne.py deleted file mode 100644 index 6592da81..00000000 --- a/treenode/models/pomocne.py +++ /dev/null @@ -1 +0,0 @@ -from seminar.models.pomocne import * diff --git a/treenode/serializers.py b/treenode/serializers.py index d26964d1..435a14d4 100644 --- a/treenode/serializers.py +++ b/treenode/serializers.py @@ -5,7 +5,7 @@ from odevzdavatko.models import Reseni from tvorba.models import Problem, Uloha from .models import RocnikNode, CisloNode, MezicisloNode, TemaVCisleNode, OrgTextNode, PohadkaNode, TextNode, TreeNode, CastNode, UlohaZadaniNode, UlohaVzorakNode, ReseniNode -from .models.pomocne import Text +from .models import Text from treenode import treelib DEFAULT_NODE_DEPTH = 2 diff --git a/treenode/views.py b/treenode/views.py index ee8cd897..bc817faf 100644 --- a/treenode/views.py +++ b/treenode/views.py @@ -7,7 +7,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import PermissionDenied from .models import TemaVCisleNode, RocnikNode, CisloNode, UlohaVzorakNode, UlohaZadaniNode, TreeNode, CastNode, TextNode, ReseniNode, PohadkaNode, OrgTextNode -from .models.pomocne import Text, Obrazek +from .models import Text, Obrazek from treenode import treelib import treenode.forms as f import treenode.templatetags as tnltt diff --git a/treenode/viewsets.py b/treenode/viewsets.py index 5280b5e4..e668436e 100644 --- a/treenode/viewsets.py +++ b/treenode/viewsets.py @@ -8,7 +8,7 @@ from odevzdavatko.models import Reseni from tvorba.models import Problem, Uloha from .models import TextNode, CastNode, UlohaVzorakNode, UlohaZadaniNode, ReseniNode -from .models.pomocne import Text +from .models import Text import treenode.serializers as views from treenode.permissions import AllowWrite diff --git a/tvorba/testutils.py b/tvorba/testutils.py index 4bbed8e4..53229d18 100644 --- a/tvorba/testutils.py +++ b/tvorba/testutils.py @@ -11,7 +11,7 @@ from .models import Rocnik, Cislo, Deadline, Problem, Tema, Uloha, Clanek from odevzdavatko.models import Reseni, Hodnoceni # TODO zbavit se treenodů do treenode.testutils (ty pak klidně volat odtud) from treenode.models import TextNode, UlohaZadaniNode, UlohaVzorakNode, RocnikNode, CisloNode, TemaVCisleNode, CastNode, MezicisloNode, ReseniNode -from treenode.models.pomocne import Text +from treenode.models import Text from treenode.treelib import all_children, insert_last_child, all_children_of_type, create_node_after