[Grok-dev] view predicates in Grok?

Chris McDonough chrism at plope.com
Fri Jan 1 18:21:51 EST 2010


It should not be hard to replicate; see "Configurator.add_view", 
"_make_predicates" and the "Multiview" class in 
http://svn.repoze.org/repoze.bfg/trunk/repoze/bfg/configuration.py .

- C


Martijn Faassen wrote:
> Hi there,
> 
> I saw the following blog entry by Chris McDonough about the use of view 
> predicates (in addition to adapter lookup, if I understand right) for 
> view lookups. I thought this an interesting idea, so thanks Chris for 
> describing it and Malthe for doing the explorations.
> 
> http://www.plope.com/Members/chrism/bfg_view_dispatch
> 
> I think it would be interesting to explore adding such a facility to the 
> view lookup mechanism in grok.
> 
> I'm asking for volunteers to:
> 
> * investigate how BFG's implementation works, and whether it can reused 
> and/or extracted somehow. (if extracted we'll need to figure out where 
> we can maintain the extracted bits, i.e. what are the possible rights 
> issues around importing this into svn.zope.org?).
> 
> * come up with some idea on what this might look like in Grok. 
> Additional directive to be used in grok.View, perhaps, but what this 
> looks like really depends on the previous explorations.
> 
> * explore whether patterns in Grok cannot be implemented more easily 
> with view predicates, such as REST-based lookups (which might be done 
> with a dispatch on request_param)
> 
> I'll of course be interested in exploring this myself as well, so do 
> please report progress here on the mailing list.
> 
> Anyone?
> 
> Regards,
> 
> Martijn
> 
> 
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
> 



More information about the Grok-dev mailing list