Pylons allows any URL to be mapped to any controller and action. You configure this in the routes.py file. You can also set specific conditions for the mapping like this:
map.connect('login', controller='login', action='check',\This maps URL /login POST requests to the check method of the login controller. The path is still /login so no redirect is required. It is much more elegant but I only discovered it by accident in the Pylons tutorials. Who knows, there may be a better solution.
conditions=dict(method='POST'))
No comments:
Post a Comment