On Wednesday, 15 October 2014 05:35:19 UTC-7, Thierry Florac wrote:
>
> Hi,
>
> Always on the road to adapting a Zope 3 application to Pyramid...
>
> Another of my problems is that Zope3 is handling "namespace" traversers; 
> for example, you can use URLs like "/++skin++MySkin/...", 
> "/++etc++site/...", or anything else by defining custom namespaces.
> In my use case, the goal of such namespaces is generally to get a resource 
> throught an adapter. For example: "myimage/++display++500x500.png" will use 
> an adapter to get a thumbnail of 500x500 px of an image.
>
> My question is simple: what is the best way with Pyramid to handle such 
> case? Should I have to write a custom traverser? Use a router ??
> Maybe it looks like an hybrid URL, but where traversing should be used 
> before routing...?
>

If you are only using namespace traversers at the end of the url, consider 
replacing them with a view addressed like "myimage/@@display/500x500.png"

In that view you can access the request.subpath == ['500x500.png']

Laurence

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to