only works with routes, but i didn't find any non-routes mappers for
pylons ;)

this is a dumb little helper that is useful as all hell (though it
took me too long tracing vars throughout pylons to figure out )

personally, i think url_for should call this as well, to make sure
that it generates valid routes ( as url_for('/my/invalid_path') will
return '/my/invalid/path' and does no checking )

-------

def url_is_valid(path):
    map = config['routes.map']
    matches = map.match(path)
    if matches:
        return True
    return False


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

Reply via email to