[Grok-dev] Review - REST support in Grok

Paul Wilson paulalexwilson at gmail.com
Wed Oct 14 12:11:18 EDT 2009


2009/10/14 Jan-Wijbrand Kolman <janwijbrand at gmail.com>:
> First couple of thoughts:
>
> 2) Near the end there's an example on how to apply the rest skin in a
> traverse event subscriber. Useful! I would like to see a note though
> that having this traverse event subscriber in there will effectively
> bypass the "normal" view behaviour from that traverse step onwards.

How does this sound:

--%<--
Note that we apply the skin during traversal of the root (application)
object such that the skin is applied early. It is important to realise
that all requests made to views upon MyApp **and its subobjects**
will have the skin applied to it, since the traverser will always traverse
``MyApp`` en route. If this is a problem, you could subscribe to
traversal events from more specific objects such as containers and
models. However, you cannot subscribe to traversal events on your views.
This is because the traverser sees views as the end of traversal, not
part of it, and thus the ``grok.IBeforeTraverseEvent`` event will not
be issued.
--%<--

Thanks,
Paul


More information about the Grok-dev mailing list