[ckan-changes] [ckan/ckan] 2ca617: [#3196] Common request object for Flask and Pylons
GitHub
noreply at github.com
Mon Aug 8 15:19:40 UTC 2016
Branch: refs/heads/3196-common-request
Home: https://github.com/ckan/ckan
Commit: 2ca6171a0610b71e63ea76f1dae2f45df04f548a
https://github.com/ckan/ckan/commit/2ca6171a0610b71e63ea76f1dae2f45df04f548a
Author: amercader <amercadero at gmail.com>
Date: 2016-08-08 (Mon, 08 Aug 2016)
Changed paths:
M ckan/common.py
M ckan/tests/test_common.py
Log Message:
-----------
[#3196] Common request object for Flask and Pylons
A new CKAN Request object based on Werkzeug's LocalProxy that will forward
to Flask or Pylons own request objects depending on the output of
`_get_request` (which essentially calls `is_flask_request`), and at the
same time provide all objects methods to be able to interact with them
transparently.
We don't use LocalProxy directly so we can handle the special case of
accessing query string parameters via `request.params` on Flask (which
uses `request.args`). All new Flask-only code should use `args` but for
backwards compatibility we will support `params` for a while.
More information about the ckan-changes
mailing list