Re: [web2py] Replacing template engine

2010-01-27 Thread Timothy Farrell
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:

Re: [web2py] Replacing template engine

2010-01-27 Thread Thadeus Burgess
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

[web2py] Replacing template engine

2010-01-26 Thread Alexandre
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

Re: [web2py] Replacing template engine

2010-01-26 Thread Thadeus Burgess
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