views.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:lighthouse 作者: dstl 项目源码 文件源码
def form_invalid(self, form):
        """
        The user has provided invalid credentials (this was checked in
        AuthenticationForm.is_valid()). So now we set the test cookie again
        and re-render the form with errors.
        """
        self.set_test_cookie()
        if form.has_error(NON_FIELD_ERRORS, 'admin_user'):
            return HttpResponseRedirect('/admin/')
        return super(LoginView, self).form_invalid(form)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号