|
|
@ -3,47 +3,60 @@ import seminar.models as m |
|
|
|
|
|
|
|
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 |
|
|
|
def isRocnik(value): |
|
|
|
return isinstance(value, m.RocnikNode) |
|
|
|
return isinstance(value, m.RocnikNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isCislo(value): |
|
|
|
return isinstance(value, m.CisloNode) |
|
|
|
return isinstance(value, m.CisloNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isCast(value): |
|
|
|
return isinstance(value, m.CastNode) |
|
|
|
return isinstance(value, m.CastNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isText(value): |
|
|
|
return isinstance(value, m.TextNode) |
|
|
|
return isinstance(value, m.TextNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isTemaVCisle(value): |
|
|
|
return isinstance(value, m.TemaVCisleNode) |
|
|
|
return isinstance(value, m.TemaVCisleNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isKonfera(value): |
|
|
|
return isinstance(value, m.KonferaNode) |
|
|
|
return isinstance(value, m.KonferaNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isClanek(value): |
|
|
|
return isinstance(value, m.ClanekNode) |
|
|
|
return isinstance(value, m.ClanekNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isUlohaVzorak(value): |
|
|
|
return isinstance(value, m.UlohaVzorakNode) |
|
|
|
return isinstance(value, m.UlohaVzorakNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isUlohaZadani(value): |
|
|
|
return isinstance(value, m.UlohaZadaniNode) |
|
|
|
return isinstance(value, m.UlohaZadaniNode) |
|
|
|
|
|
|
|
@register.filter |
|
|
|
def isPohadka(value): |
|
|
|
return isinstance(value, m.PohadkaNode) |
|
|
|
return isinstance(value, m.PohadkaNode) |
|
|
|
|
|
|
|
#@register.filter |
|
|
|
#def isOtisteneReseniNode(value): |
|
|
|
# return isinstance(value, m.OtisteneReseniNode) |
|
|
|
# return isinstance(value, m.OtisteneReseniNode) |
|
|
|
|
|
|
|