26
24
if Creole is None and settings.DEBUG:
29
27
parser = CreoleParser(dialect=dialect)
30
28
return parser.render(text)
32
31
class CreoleTextNode(template.Node):
33
33
def __init__(self, nodelist):
36
36
def render(self, context):
37
37
return creole(self.nodelist.render(context))
40
41
def crl_tag(parser, token):
44
47
nodelist = parser.parse(('endcreole',))
45
48
parser.delete_first_token()
46
49
return CreoleTextNode(nodelist)