[Grok-dev] has_render() and has_no_render() checks in grokcore.viewlet versus grokcore.view, grokcore.layout and grokcore.formlib
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Tue Sep 4 10:51:05 UTC 2012
Hi,
I'm working on some viewlet-ish components that, in their baseclass will
have a render() method. However, the template grokker for viewlets will
complain (as it should) when both a template and a render() is available
on the viewlet-ish components.
To prevent this, I thought to use the same trick as is used in
grokcore.view, grokcore.layout and grokcore.formlib, where the render()
method is "decorated" with a render.base_method = True attribute.
However, this doesn't work for viewlets.
So, I just checked in a change on the grokcore.viewlet trunk where it
now also uses the trick with the render.base_method = True.
If you do no see any objections, I'd like to make a release of
grokcore.viewlet with this change.
regards, jw
More information about the Grok-dev
mailing list