after some investigation it seems as though the best way to do this is
to override the PylonsBaseWSGIApp.resolve method - unfortunately the
structure of Pylons does not make this easy - there seems little point
describing how i did this (because it's so ugly) however i would like
to recommend a modification for a future version of Pylons: namely,
making it easier to override the PylonsBaseWSGIApp.resolve method


On May 30, 8:52 pm, "Gregory W. Bond" <[EMAIL PROTECTED]> wrote:
> i've been scratching my head about how to do this with Routes but i'm
> beginning to think it's not possible
>
> what i want to do is compute the controller value based on (dynamic
> parts) of the requested url - for example, if the requested url is /
> users/[user]/account/[account], i'd like to be able to provide Routes
> with a function to compute the controller value based on the values of
> 'user' and 'account'
>
> nothing i've seen in this group or in the Routes documentation says
> this isn't possible - on the other hand, i haven't been able to find
> any examples of how this might be accomplished either
>
> assuming that Routes doesn't support this, the only other approach i
> think might work is to use the paste.recursive module as described in
> this 
> post:http://groups.google.com/group/pylons-discuss/browse_frm/thread/2dcc9...
>
> using this approach, the idea would be to have Routes direct the
> request to a default controller and then the default controller would
> self-redirect to the computed controller
>
> however the post specifies that to make this work the redirecting
> controller cannot inherit from pylons.Controller - what i don't
> understand is what the redirecting controller should look like if it
> can't inherit from pylons.Controller - can anybody provide a simple
> example?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to