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

Toby Dacre toby.okfn at gmail.com
Tue Sep 4 10:06:28 UTC 2012


On 4 September 2012 10:54, Rufus Pollock <rufus.pollock at okfn.org> wrote:

> On 4 September 2012 09:34, Sean Hammond <sean.hammond at okfn.org> wrote:
> >> 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
> >
> > Definitely, no sense in making up additional names, just makes things
> > harder to grep.
>
> Just as a small point of information I note the routes docs state:
>
> "It’s recommended to name all routes that may be used in generation,
> but it’s not necessary to name other routes." [1]
>
> Obviously do not *have* to respect this as just a recommendation from them.
>
>
yeah they also recommend using None when there isn't one, but I disagree
with both of these for readability and usability reasons

tobes


> Rufus
>
> [1]: http://routes.readthedocs.org/en/latest/setting_up.html
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120904/87ce3b6d/attachment-0001.html>


More information about the ckan-dev mailing list