#NEWLINE# def _should_track( self , user , request , response ) : #NEWLINE# #INDENT# if ( not hasattr ( request , 'session' ) ) : #NEWLINE# #INDENT# msg = 'VisitorTrackingMiddleware installed withoutSessionMiddleware' #NEWLINE# warnings . warn ( msg , RuntimeWarning ) #NEWLINE# return False #NEWLINE# #UNINDENT# if ( request . is_ajax ( ) and ( not TRACK_AJAX_REQUESTS ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( response . status_code in TRACK_IGNORE_STATUS_CODES ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( ( user is None ) and ( not TRACK_ANONYMOUS_USERS ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# path = request . path_info . lstrip ( '/' ) #NEWLINE# for url in track_ignore_urls : #NEWLINE# #INDENT# if url . match ( path ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return True