#NEWLINE# @ anonymous_csrf #NEWLINE# def handle403( request ) : #NEWLINE# #INDENT# 'A 403 message that looks nicer than the normal Apache forbidden page' #NEWLINE# no_cookies = False #NEWLINE# referer = request . META . get ( 'HTTP_REFERER' ) #NEWLINE# if referer : #NEWLINE# #INDENT# no_cookies = ( referer . endswith ( reverse ( 'users.login' ) ) or referer . endswith ( reverse ( 'users.register' ) ) ) #NEWLINE# #UNINDENT# return render ( request , 'handlers/403.html' , { #NEWLINE# #INDENT# 'form' : AuthenticationForm ( ) , #NEWLINE# 'no_cookies' : referer , #NEWLINE# #UNINDENT# } , status = 403 )