> It currently also supports a sort of inheritance by way of $return. I
> think Aaron doesn't like that; I'm still open to other ideas. I was
> thinking of adding support for decorators ([EMAIL PROTECTED] at the top of the
> template, before any $def line), and including an `inherit` decorator
> which would also be an automatic global, and would look something
> like this:
> def inherit(parent, *args, **kwargs):
> def dec(func):
> def _f(*_args, **kwargs):
> return parent(func(*_args, **kwargs), *args, **kwargs)
> return _f
> return dec
>
> For example, if you have these templates:
>
> #base.html
> $def with (body, title)
> <title>$title</title>
> $:body
>
> #index.html
> Hello
The new way to handle this is:
def rendersite(handle):
page = handle()
return render.site(page)
app.add_processor(rendersite)
This passes output of every request through site template.
Adam Atlas, is your implementation available online? Can you share
the url?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---