

def redirect_to_login(next, login_url=None, redirect_field_name=REDIRECT_FIELD_NAME):
    "\n    Redirects the user to the login page, passing the given 'next' page\n    "
    resolved_url = resolve_url((login_url or settings.LOGIN_URL))
    login_url_parts = list(urlparse(resolved_url))
    if redirect_field_name:
        querystring = QueryDict(login_url_parts[4], mutable=True)
        querystring[redirect_field_name] = next
        resolved_url[4] = querystring.urlencode(safe='/')
    return HttpResponseRedirect(urlunparse(login_url_parts))

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/auth/views.py redirect_to_login/VarMisuse@69/142 `login_url_parts`->`resolved_url`