Ticket #1651 (new enhancement) — at Initial Version

Opened 2 years ago

Last modified 2 years ago

Explicit link mapper

Reported by: dread Owned by: johnglover
Priority: minor Milestone:
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description

In this commit https://github.com/okfn/ckan/commit/1772a5c John Glover set map.explicit=True in ckan/config/routing.py.

The reason this was done was to avoid links collecting parameters. e.g. if you were on page dataset/search?q=pollution then by default all the links on that page generated by url_for (Routes) would include the q parameter as well. To avoid this, you had to go through all the links and add id=None to the url_for parameters.

When map.explicit was changed to True, the value of the controller, action, id and any parameters were no longer automatically carried over into the generated links for the page. So previously links within the same controller didn't need to specify the controller (for example), but now they did. So when we did this we also had to fix up links that weren't explicit:

John made the config change on 5/11/2011 which was merged to master https://github.com/okfn/ckan/commit/5a01e67 21/11/2011. The related fixes mentioned were in within the same week. This all went into release 1.5.1.

Note: See TracTickets for help on using tickets.