#NEWLINE# def process_request( self , request ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# request . django_root #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# request . django_root = '' #NEWLINE# #UNINDENT# login_url = ( settings . LOGIN_URL + ( '?next=%s' % request . path ) ) #NEWLINE# if request . path . startswith ( request . django_root ) : #NEWLINE# #INDENT# path = request . path [ len ( request . django_root ) : ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return HttpResponseRedirect ( login_url ) #NEWLINE# #UNINDENT# if ( ( not request . user . is_authenticated ( ) ) and ( not ( ( path == settings . LOGIN_URL ) or self . matches ( path ) ) ) ) : #NEWLINE# #INDENT# logger . debug ( ( 'Redirecting locked down site %s to login.' % path ) ) #NEWLINE# return HttpResponseRedirect ( login_url ) #NEWLINE# #UNINDENT# return None