ckanext-pdfview
ckanext-pdfview copied to clipboard
[#31] Fix Flask exception
Fixes #31
Adds a helper function to check whether a request is Flask or Pylons and use the appropriate function (request.str_GET vs request.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.