is it possible to redirect in a route definition, or do i need to create a 
view ?

in the example below, i don't have an /account/my/archive page.  if someone 
tries to hack the url, i want to send them to /account/my

i'm doing this in a view, but i'm just wondering if anyone else has cleaner 
ways

app/routes.py
    config.add_route("account::my::archive", "/account/my/archive")
    config.add_route("account::my::archive::comments", 
"/account/my/archive/comments")
    config.add_route("account::my::archive::posts", 
"/account/my/archive/posts")
app/views/my.py

    @view_config(route_name="account::my::archive")
    def my_archive(self):
       return HTTPFound('/account/my')

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-discuss/-/0pnffb1dZMcJ.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to