Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#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.
- Loading branch information
Showing
2 changed files
with
80 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters