[ckan-changes] [ckan/ckan] 34f3f1: [#3194] Consolidate a single redirect function

GitHub noreply at github.com
Mon Aug 8 11:41:54 UTC 2016


  Branch: refs/heads/3194-fix-redirects
  Home:   https://github.com/ckan/ckan
  Commit: 34f3f18e8893b5fc33047df94c88d4852c9a1f6b
      https://github.com/ckan/ckan/commit/34f3f18e8893b5fc33047df94c88d4852c9a1f6b
  Author: amercader <amercadero at gmail.com>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ckan/controllers/package.py
    M ckan/controllers/util.py
    M ckan/lib/base.py
    M ckan/lib/helpers.py

  Log Message:
  -----------
  [#3194] Consolidate a single redirect function

Only use helpers.redirect_to (which uses routes.redirect_to), not
pylons.redirect or pylons.redirect_to.

This takes care of lang bits in the url and is the one exposed on the
toolkit.


  Commit: 7a0623c7be0598db3aab7604ca7b1014157cf871
      https://github.com/ckan/ckan/commit/7a0623c7be0598db3aab7604ca7b1014157cf871
  Author: amercader <amercadero at gmail.com>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ckan/lib/helpers.py
    M ckan/tests/controllers/test_tags.py
    M ckan/tests/controllers/test_util.py

  Log Message:
  -----------
  [#3194] Ensure that relative redirects use the host on ckan.site_url


  Commit: 901af2757f9599a61bf136830d792d556a9b2069
      https://github.com/ckan/ckan/commit/901af2757f9599a61bf136830d792d556a9b2069
  Author: amercader <amercadero at gmail.com>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ckan/tests/helpers.py
    M ckanext/example_igroupform/tests/test_controllers.py

  Log Message:
  -----------
  [#3194] Set HTTP_HOST to ckan.site_url on submit_and_follow

So redirects use the correct host


  Commit: dae599a211f358855b3f5ecaed7fd30aea164824
      https://github.com/ckan/ckan/commit/dae599a211f358855b3f5ecaed7fd30aea164824
  Author: amercader <amercadero at gmail.com>
  Date:   2016-08-08 (Mon, 08 Aug 2016)

  Changed paths:
    M ckan/tests/legacy/functional/test_user.py

  Log Message:
  -----------
  Use own url_for rather than routes'

As we handle the host correctly. This will be done to all tests when the
new url_for work is merged


Compare: https://github.com/ckan/ckan/compare/34f3f18e8893^...dae599a211f3


More information about the ckan-changes mailing list