Podezřelé semináře (#1465) #65

Merged
zelvuska merged 27 commits from podezrele-seminare into master 2024-11-05 20:31:55 +01:00
8 changed files with 6 additions and 8 deletions
Showing only changes of commit 9b14e4a333 - Show all commits

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

(Tu chybí MeziCisloNode, to je vcelku podezřelé…)

(Tu chybí `MeziCisloNode`, to je vcelku podezřelé…)
Review

Asi nejsem schopen opravit (aniž bych se snažil pochopit treenode).

Asi nejsem schopen opravit (aniž bych se snažil pochopit treenode).
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

View file

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

View file

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