Is it possible in web.py to do something similar to Django's reverse
[1] function? Is there an example of best practice for this? The
cookbook doesn't seem to have anything.

For example, if I wanted to redirect the user to the original blog
post page after a successful comment:

urls = (
    '/([-a-zA-Z0-9_]+)/', 'entry'
)

class entry(object):
    ....
    def POST(self):
        ...
        if success:
            # works better for separation than seeother('/%s/' %
entry.slug)
            return web.seeother(reverse('entry'))


[1] http://docs.djangoproject.com/en/dev/topics/http/urls/#reverse
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to