IIRC, response._caller acts like a function decorator. So it takes a
function and returns a function. I used to use Genshi like this:
def renderGenshi(func):
def _render():
output = func()
if not isinstance(dict, output):
return output
else:
I dislike django-like templating languages.
I can't sit down and write a single simple django app without the need to
make a templatetag whose whole purpose is to format the data so I can use
djangos other broken tag models to display this data.
Django has the arugment well our designers arn't
Hi,
I want to replace web2py's template engine with Jinja
2http://jinja.pocoo.org/2/,
anyone has some experience doing something similar? I'm trying to assign
response._caller with a custom function, but I'm not having much success, is
that the right way?
Thanks,
Alexandre Rosenfeld
Eng Comp 06
Its going to be your best bet in using a different templating language. YOu
will have to make sure to only parse your HTML requests and not
json/download etc.
Basically, response._caller is a function, that returns a string which is
the html.
So you would instead of response.render(d) you would
4 matches
Mail list logo