Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #31
Adds a helper function to check whether a request is Flask or Pylons and use the appropriate function (
request.str_GET
vsrequest.args
). Tested with CKAN 2.8.2 (which uses Pylons) and a CKAN instance running on CKAN commit #98f518c (because that's where my group's instance is). Starting with and after CKAN commit #5963647, the extension no longer throws the Flask exception, but it also does not work properly (the iframe for the PDF is displayed but the PDF itself is not). I believe this is due to a change in that commit in how javascript resources are accessed but I'm not able to look into it more at the moment.