#NEWLINE# def dispatch( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# resp = super ( RecentLoginRequiredMixin , self ) . dispatch ( request , * args , ** kwargs ) #NEWLINE# if ( resp . status_code == 200 ) : #NEWLINE# #INDENT# delta = datetime . timedelta ( seconds = self . max_last_login_delta ) #NEWLINE# if ( now ( ) > ( request . user . last_login + delta ) ) : #NEWLINE# #INDENT# return logout_then_login ( request , self . get_login_url ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return resp #NEWLINE# #UNINDENT# #UNINDENT# return resp