我正在尝试将自定义模板和表单传递给auth.views.login。我收到错误消息。这有什么问题?
在views.py中,
def login_user(request, template_name='login.html',
redirect_field_name = None,
authentication_form = BootstrapAuthenticationForm,
extra_context=None):
response = auth.views.login(request, template_name, redirect_field_name, authentication_form)
答案 0 :(得分:0)
您应返回您视图中的回复:
def login_user(request, template_name='login.html',
redirect_field_name = None,
authentication_form = BootstrapAuthenticationForm,
extra_context=None):
return auth.views.login(request, template_name, redirect_field_name,
authentication_form)