Browse Source

Treenode: žádné pomocné treenody nebudou.

pull/65/head
Pavel "LEdoian" Turinsky 2 weeks ago
parent
commit
9b14e4a333
  1. 2
      treenode/admin.py
  2. 2
      treenode/forms.py
  3. 1
      treenode/models/__init__.py
  4. 1
      treenode/models/pomocne.py
  5. 2
      treenode/serializers.py
  6. 2
      treenode/views.py
  7. 2
      treenode/viewsets.py
  8. 2
      tvorba/testutils.py

2
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

2
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

1
treenode/models/__init__.py

@ -1 +0,0 @@
from seminar.models.treenode import *

1
treenode/models/pomocne.py

@ -1 +0,0 @@
from seminar.models.pomocne import *

2
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

2
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

2
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

2
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

Loading…
Cancel
Save