#NEWLINE# def _should_use_token( self , view_func ) : #NEWLINE# #INDENT# '\n        Given a view function, determine whether or not we should deliver a\n        CSRF token to this view through the response and validate CSRF tokens\n        upon requests to this view.\n\n        :param view_func: A view function.\n        ' #NEWLINE# if ( ( view_func is None ) or ( self . _type not in ( 'exempt' , 'include' ) ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# view = '{0}.{1}' . format ( view_func . __module__ , view_func . __name__ ) #NEWLINE# if ( ( self . _type == 'exempt' ) and ( view in self . _exempt_views ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( ( self . _type == 'include' ) and ( view not in self . _include_views ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# url = '{0}{1}' . format ( request . script_root , request . path ) #NEWLINE# if url . startswith ( self . _exempt_urls ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# return True