|
@ -3,47 +3,60 @@ import seminar.models as m |
|
|
|
|
|
|
|
|
register = template.Library() |
|
|
register = template.Library() |
|
|
|
|
|
|
|
|
|
|
|
@register.filter |
|
|
|
|
|
def nodeType(value): |
|
|
|
|
|
if isinstance(value,RocnikNode): return "Ročník" |
|
|
|
|
|
if isinstance(value,CisloNode): return "Číslo" |
|
|
|
|
|
if isinstance(value,CastNode): return "Část" |
|
|
|
|
|
if isinstance(value,TextNode): return "Text" |
|
|
|
|
|
if isinstance(value,TemaVCisleNode): return "Téma v čísle" |
|
|
|
|
|
if isinstance(value,KonferaNode): return "Konfera" |
|
|
|
|
|
if isinstance(value,ClanekNode): return "Článek" |
|
|
|
|
|
if isinstance(value,UlohaVzorakNode): return "Vzorák" |
|
|
|
|
|
if isinstance(value,UlohaZadaniNode): return "Zadání úlohy" |
|
|
|
|
|
if isinstance(value,PohadkaNode): return "Pohádka" |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isRocnik(value): |
|
|
def isRocnik(value): |
|
|
return isinstance(value, m.RocnikNode) |
|
|
return isinstance(value, m.RocnikNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isCislo(value): |
|
|
def isCislo(value): |
|
|
return isinstance(value, m.CisloNode) |
|
|
return isinstance(value, m.CisloNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isCast(value): |
|
|
def isCast(value): |
|
|
return isinstance(value, m.CastNode) |
|
|
return isinstance(value, m.CastNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isText(value): |
|
|
def isText(value): |
|
|
return isinstance(value, m.TextNode) |
|
|
return isinstance(value, m.TextNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isTemaVCisle(value): |
|
|
def isTemaVCisle(value): |
|
|
return isinstance(value, m.TemaVCisleNode) |
|
|
return isinstance(value, m.TemaVCisleNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isKonfera(value): |
|
|
def isKonfera(value): |
|
|
return isinstance(value, m.KonferaNode) |
|
|
return isinstance(value, m.KonferaNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isClanek(value): |
|
|
def isClanek(value): |
|
|
return isinstance(value, m.ClanekNode) |
|
|
return isinstance(value, m.ClanekNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isUlohaVzorak(value): |
|
|
def isUlohaVzorak(value): |
|
|
return isinstance(value, m.UlohaVzorakNode) |
|
|
return isinstance(value, m.UlohaVzorakNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isUlohaZadani(value): |
|
|
def isUlohaZadani(value): |
|
|
return isinstance(value, m.UlohaZadaniNode) |
|
|
return isinstance(value, m.UlohaZadaniNode) |
|
|
|
|
|
|
|
|
@register.filter |
|
|
@register.filter |
|
|
def isPohadka(value): |
|
|
def isPohadka(value): |
|
|
return isinstance(value, m.PohadkaNode) |
|
|
return isinstance(value, m.PohadkaNode) |
|
|
|
|
|
|
|
|
#@register.filter |
|
|
#@register.filter |
|
|
#def isOtisteneReseniNode(value): |
|
|
#def isOtisteneReseniNode(value): |
|
|
# return isinstance(value, m.OtisteneReseniNode) |
|
|
# return isinstance(value, m.OtisteneReseniNode) |
|
|
|
|
|
|
|
|