On Mar 23, 8:56 pm, "Mike Orr" <[EMAIL PROTECTED]> wrote:
> You can check if there's a valid route by getting the routemapper out
> of the environ and trying to match it, but that won't tell you whether
> the controller and action exist.  You'd have to duplicate Pylons'
> dispatching code to do that.  Or you could make a subrequest and see
> if it raises an HTTP error, but that's a bit messy and you'd end up
> invoking the second page twice if it exists.

"duplicate Pylons' dispatching code to do that"
ugh... sounds like i'm patching pylons...


> Why can't you let the second request worry about it?  Just redirect to
> /preview/*url assuming it will succeed, and have a catchall route
> after the other preview routes that catches invalid /preview/*url and
> redirects again to /preview.

that's why i'm doing now. but it makes me  feel so dirty.
--~--~---------~--~----~------------~-------~--~----~
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