[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 11:38:01 UTC 2012


Hi,

released as grokcore.viewlet 1.11
also updated the groktoolkit (but no release yet).

regards, jw

On 9/4/12 13:25 , Christian Klinger wrote:
> Hi Jan
> 
> no objections form me...
> 
> Christian
> 
> Jan-Wijbrand Kolman schrieb:
>> 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