コード例 #1
0
ファイル: views.py プロジェクト: kmoe/oh-mainline
def change_password_do(request):
    # {{{
    form = django.contrib.auth.forms.PasswordChangeForm(request.user, request.POST)
    if form.is_valid():
        form.save()
        clear_user_sessions(request.user, session_to_omit=request.session)
        return HttpResponseRedirect(reverse(change_password) + "?notification_id=success")
    else:
        return change_password(request, change_password_form=form)
コード例 #2
0
def change_password_do(request):
    # {{{
    form = django.contrib.auth.forms.PasswordChangeForm(
        request.user, request.POST)
    if form.is_valid():
        form.save()
        clear_user_sessions(request.user, session_to_omit=request.session)
        return HttpResponseRedirect(
            reverse(change_password) + '?notification_id=success')
    else:
        return change_password(request, change_password_form=form)