#NEWLINE# def exempt( self , view ) : #NEWLINE# #INDENT# "A decorator that can exclude a view from csrf protection.\n\n        Remember to put the decorator above the `route`::\n\n            csrf = CsrfProtect(app)\n\n            @csrf.exempt\n            @app.route('/some-view', methods=['POST'])\n            def some_view():\n                return\n        " #NEWLINE# if isinstance ( view , string_types ) : #NEWLINE# #INDENT# view_location = view #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# view_location = ( '%s.%s' % ( view . __module__ , view . __name__ ) ) #NEWLINE# #UNINDENT# self . _exempt_views . add ( view_location ) #NEWLINE# return view