subhajeet2107 opened a new issue #4935: How to csrf exempt blueprint view URL: https://github.com/apache/incubator-superset/issues/4935 Make sure these boxes are checked before submitting your issue - thank you! - [ *] I have checked the superset logs for python stacktraces and included it here as text if any - [ *] I have reproduced the issue with at least the latest released version of superset - [ *] I have checked the issue tracker for the same issue and I haven't found one similar ### Superset version superset==0.24.0 ### Expected results ### Actual results ### Steps to reproduce How do i csrf exempt a url like `/custom-url` in blueprint ? Following does not work: ```python from superset import app from flask_wtf.csrf import CSRFProtect csrf = CSRFProtect(app) simple_page = Blueprint('simple_page', __name__, template_folder='templates') @simple_page.route('/custom-url', methods=['GET', 'POST']) def page(): - - - - - ``` I am getting ```python File "/usr/local/lib/python3.5/dist-packages/flask_wtf/csrf.py", line 177, in init_app app.extensions['csrf'] = self AttributeError: module 'superset.app' has no attribute 'extensions' ``` basically i am not able to access the Flask app context and do WTF CSRF Exempt
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
