I'm trying to debug a problem I'm having with routing.py. Most of
mine work but this one matches 5 dynamic parts and one tends to have
long strings, error messages typically.
m.connect('kb_search', 'kb/:fac/:sev/:expires/:checksum/*text',
controller='kb', action='search')
I use urllib.quote_plus(text) to encode the text before I create the
URL. Right now I'm creating it manually but wuld like to use url_for()
if you could clue me in on how to access it outside pylons/myghty (my
code runs from cron).
It matches my generated URLs *most* of the time, but on some it fails,
with myghty giving me a 404. If I understand routes right, that
implies that I don't have the right number of parameters, there are
too few or too many.
I was hoping I could use a 'greedy' url to match everything after the
'kb/' and show me what it thought it got:
m.connect('kb_urlcheck', 'kb/*query',
controller='kb', action='urlcheck')
But that doesn't match either. Is there a way to match "everything
after" a base url?
Seems the best option is learnign how to access url_for() in my cron
script, with knowledge of my routes in .../config/routing.py. Could
you point me in the right direction?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---