[Grok-dev] TemplateRegistry shouldn't be aware of views, viewlets, ...

Philipp von Weitershausen philipp at weitershausen.de
Fri Mar 14 07:08:08 EDT 2008


Currently, the TemplateRegistry has code to check whether templates are 
correctly registered for views and viewlets. Fortunately, most of this 
checking is factored into a single, reusable method. That's why I don't 
understand why the TemplateRegistry needs to be aware of views and 
viewlets at all. What happens when we add another type of component that 
can also use a template (e.g. viewlet managers [1], widgets, etc.)? We'd 
have to modify the Grok core...

I've refactored the parts of the TemplateRegistry that are aware of 
views and viewlets into their respective grokkers. This change [2] is 
currently sitting on a branch. With no objections from anybody, I'm 
going to merge it soon.


[1] Incidentally, Michael Haubenwallner filed a bug report for this 
moments ago: https://bugs.launchpad.net/bugs/202105
[2] http://svn.zope.org/?rev=84651&view=rev



More information about the Grok-dev mailing list