The Django way of doing inheritance is much clearer IMHO. On 2 March 2010 16:51, benhoyt <[email protected]> wrote: > Hi guys, > > A few years ago now, Adam Atlas said this (at > http://groups.google.com/group/webpy/browse_thread/thread/2ff43aba3aeac295/d3b1a1f48551277d): > >> Firstly, the 'render' object should be an automatic global. >> [...snipped...] >> That way, you can just call page(post), instead of base(page(post)) >> (which, as I explained elsewhere, is rather inelegant and violates MVC >> separation). > > Did anything ever happen to Adam's proposal? It seems like the > recommended way now (as per http://webpy.org/cookbook/layout_template) > is to pass render() a "base" keyword arg. I agree with Adam -- it > seems to me that this should be done in the template. Why does > web.py's templator do it in the Python code? > >> As a side effect, making the render object an automatic global will >> also allow simple inclusion, for those who prefer that style to the >> inheritance model. > > I'm used to, and quite like, the "simple inclusion" way of doing > things. Can someone explain the advantages of the "template > inheritance" approach? > > -Ben > > -- > 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. > >
-- 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.
