[ckan-dev] RFC: routes - named routes and redirects

Toby Dacre toby.okfn at gmail.com
Mon Sep 3 10:04:21 UTC 2012


Hi,

I Think we should be a bit more consistent in our use of routes

named routes
--------------------
sometimes we use named routes eg
    m.connect('storage_api', '/api/storage', action='index')

Sometimes not eg
    m.connect('/feeds/group/{id}.atom', action='group')

personally I'd remove all named routes and just use the controller=..,
action=.. approach


redirects
-------------

sometimes we do redirects like
    map.redirect('/users/{url:.*}', '/user/{url}')

Do we really want to encourage the use of multiple urls going to the same
place - some such as
    map.redirect('/package/{url:.*}', '/dataset/{url}')

are needed for backwards compatibility (but for how long?)- and in this
case because the ckanclient was never updated but do we want to do this?
The users example above is really bad because /users/moo works but /users
gives a 404

While I'd like to see these removed from routes how about as part of 2.0
I'm really keen we don't add more.  What do the rest of you think?

Toby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120903/3b90b34c/attachment.html>


More information about the ckan-dev mailing list