Ticket #1651 (closed enhancement: fixed)

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 (last modified by dread) (diff)

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/{id}/resource/{resource_id} then by default all the links on that page generated by url_for (Routes) would include the id and resource_id parameters as well. To avoid this, you had to go through all the links and add id=None and resource_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. The requirement

Change History

comment:1 Changed 2 years ago by dread

  • Description modified (diff)

comment:2 Changed 2 years ago by dread

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.