[ckan-changes] [ckan/ckan] 6d961c: Set protocol and host on Flask's url_for based on ...

GitHub noreply at github.com
Fri Aug 5 13:29:17 UTC 2016


  Branch: refs/heads/poc-flask-views
  Home:   https://github.com/ckan/ckan
  Commit: 6d961c95b379fab3bc7f0854fa0060d43ca9330e
      https://github.com/ckan/ckan/commit/6d961c95b379fab3bc7f0854fa0060d43ca9330e
  Author: amercader <amercadero at gmail.com>
  Date:   2016-08-05 (Fri, 05 Aug 2016)

  Changed paths:
    M ckan/lib/helpers.py

  Log Message:
  -----------
  Set protocol and host on Flask's url_for based on ckan.site_url

Don't rely on the host generated by Flask, as SERVER_NAME might not
be set or might be not be up to date (as in tests changing
`ckan.site_url`). Contrary to the Routes mapper, there is no way in
Flask to pass the host explicitly, so we rebuild the URL manually
based on `ckan.site_url`, which is essentially what we did on Pylons




More information about the ckan-changes mailing list