def redirect_to_login(next, login_url=None, redirect_field_name=REDIRECT_FIELD_NAME):
 if (not login_url):
  login_url = settings.LOGIN_URL
 return HttpResponseRedirect(('%s?%s=%s' % (login_url, urlquote(redirect_field_name), urlquote(next))))

def redirect_to_login ( next , login_url = None , redirect_field_name = REDIRECT_FIELD_NAME ) : if ( not login_url ) : login_url = settings . LOGIN_URL return HttpResponseRedirect ( ( '%s?%s=%s' % ( login_url , urlquote ( redirect_field_name ) , urlquote ( next ) ) ) )
redirects the user to the login page .