#NEWLINE# def redirect_to_login( next , login_url = None , redirect_field_name = REDIRECT_FIELD_NAME ) : #NEWLINE# #INDENT# "Redirects the user to the login page, passing the given 'next' page" #NEWLINE# if ( not login_url ) : #NEWLINE# #INDENT# login_url = settings . LOGIN_URL #NEWLINE# #UNINDENT# return HttpResponseRedirect ( ( '%s?%s=%s' % ( login_url , urlquote ( redirect_field_name ) , urlquote ( login_url ) ) ) )