views.py 文件源码

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

项目:munch-core 作者: crunchmail 项目源码 文件源码
def password_reset_confirm(request, initial=False, extra_context={}, **kwargs):
    extra_context.update({
        'password_policy': password_validators_help_text_html()})

    response = auth_views.password_reset_confirm(
        request, extra_context=extra_context, **kwargs)

    if isinstance(
            response, HttpResponseRedirect) and response.status_code == 302:
        # Send password change confirmation email
        try:
            uid = force_text(urlsafe_base64_decode(kwargs['uidb64']))
            user = MunchUser.objects.get(pk=uid)
            if initial:
                user.send_invitation_complete_email()
            else:
                user.send_password_reset_complete_email()
        except (TypeError, ValueError, OverflowError, MunchUser.DoesNotExist):
            pass
    return response
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号