Malthe Borch wrote:
> Chris McDonough wrote:
>> Here's an example of some ZCML that would create a Routes route:
>>   <route
>>      name="blog_entry"
>>      path="/blog/:id/:view_name"
>>      context_factory=".blog.BlogEntry"
>>      context_interfaces=".interfaces.IBlogEntry .interfaces.IContent"
>>    </route>
> There's something about this directive that feels rotten. Multiple 
> interfaces? Why not just use inheritance on the interface-level.

Each directive is tacked on via alsoProvides to the context.  You can use only
one if you like (you don't need to pass many).

> A nitpick: instead of 'context_factory', why not just 'factory'? (Same 
> with 'interfaces'; I'd welcome 'for').

``factory`` would be fine.  ``for`` doesn't describe what context_interfaces
does properly; ``provides`` might be better.

- C

Repoze-dev mailing list

Reply via email to