[ckan-changes] [ckan/ckan] e22d70: [#2845] Improve origin detection on Pylons mapper

GitHub noreply at github.com
Mon Feb 29 17:31:45 UTC 2016


  Branch: refs/heads/2845-wsgi-dispatcher
  Home:   https://github.com/ckan/ckan
  Commit: e22d7068abfea60c3f6275c916e8e00d5b65e30a
      https://github.com/ckan/ckan/commit/e22d7068abfea60c3f6275c916e8e00d5b65e30a
  Author: amercader <amercadero at gmail.com>
  Date:   2016-02-29 (Mon, 29 Feb 2016)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/partyline.py

  Log Message:
  -----------
  [#2845] Improve origin detection on Pylons mapper

We can not add custom params to the defaults dict because they get added
to the URL built, eg url_for('group_index') returns `/group?core=True

Ideally we want to keep this flag attached to the actual route, because
it's hard to come up with unique keys for routes which are not named to
keep them on a separate registry. As we can get the actual matched Route
object using `map.routematch` we add a `_ckan_core` attribute to it when
building the mapper.




More information about the ckan-changes mailing list