@cache_page(60 * 30)
@csrf_protect
def login(request, template="accounts/account_login.html"):
    # Copied from mezzanine/accounts/views so we can override cacheing behavior
    # as it related to the CSRF cookie.
    form = LoginForm(request.POST or None)
    if request.method == "POST" and form.is_valid():
        authenticated_user = form.save()
        info(request, _("Successfully logged in"))
        auth_login(request, authenticated_user)
        return login_redirect(request)
    context = {"form": form, "title": _("Login")}
    return render(request, template, context)
Login Form
dataset/ETHPy150Open python/raspberryio/raspberryio/userprofile/views.py/login