[Grok-dev] Grok 1.0 final?

Jan-Wijbrand Kolman janwijbrand at gmail.com
Wed Apr 15 11:18:09 EDT 2009

Martijn Faassen wrote:
>> Can I also ask: I'm fairly confused by the whole 
>> default_namespace/namespace dance. Is there an actual use case for that?
> Ah, in template pluggability? The idea is that the default_namespace() 
> function is defined by the base template implementation. Viewlets offer 
> a different implementation that pushes the `viewletmanager`` and 
> ``viewlet`` objects into the template.
> namespace() is if a particular template wants to control what enters the 
> namespace of the template.
> I think it's quite possible we could improve this code by some judicious 
> refactoring, but I do think there are use cases for control of template 
> namespaces.

Right on both accounts; the default_namespace is defined by the template
__implementation__. A specific view using this template implementation
can then amend this namespace just before it is pushed into the template.


More information about the Grok-dev mailing list