コード例 #1
0
ファイル: user.py プロジェクト: generica/karaage
def password_change(request):

    person = request.user.get_profile()

    if request.POST:
        form = PasswordChangeForm(request.POST)

        if form.is_valid():
            form.save(person)
            return HttpResponseRedirect(reverse('kg_user_password_done'))
    else:
        form = PasswordChangeForm()

    return render_to_response('people/user_password_form.html', {'form': form}, context_instance=RequestContext(request))
コード例 #2
0
ファイル: views.py プロジェクト: NeCTAR-RC/karaage-user
def personal_details(request):

    if request.POST:
        form = PasswordChangeForm(request.POST)

        if form.is_valid():
            form.save(request.user)
            messages.success(request, "Password changed successfully")
            return HttpResponseRedirect(reverse('kg_user_profile'))
    else:
        form = PasswordChangeForm()

    return render_to_response('people/profile.html',
                              {'form': form},
                              context_instance=RequestContext(request))
コード例 #3
0
def password_change(request):

    person = request.user

    if request.POST:
        form = PasswordChangeForm(data=request.POST, person=person)

        if form.is_valid():
            form.save()
            messages.success(request, "Password changed successfully")
            return HttpResponseRedirect(reverse('kg_profile'))
    else:
        form = PasswordChangeForm(person=person)

    return render(
        template_name='karaage/common/profile_password.html',
        context={'person': person, 'form': form},
        request=request)
コード例 #4
0
ファイル: profile.py プロジェクト: andrewspiers/karaage
def password_change(request):

    person = request.user

    if request.POST:
        form = PasswordChangeForm(data=request.POST, person=person)

        if form.is_valid():
            form.save()
            messages.success(request, "Password changed successfully")
            return HttpResponseRedirect(reverse('kg_profile'))
    else:
        form = PasswordChangeForm(person=person)

    return render_to_response(
        'common/profile_password.html',
        {'person': person, 'form': form},
        context_instance=RequestContext(request))
コード例 #5
0
ファイル: views.py プロジェクト: NeCTAR-RC/karaage-user
def personal_details(request):

    if request.POST:
        form = PasswordChangeForm(request.POST)

        if form.is_valid():
            form.save(request.user)
            messages.success(request, "Password changed successfully")
            return HttpResponseRedirect(reverse('kg_user_profile'))
    else:
        form = PasswordChangeForm()

    return render_to_response('people/profile.html', {'form': form},
                              context_instance=RequestContext(request))
コード例 #6
0
ファイル: profile.py プロジェクト: wherego2000/karaage
def password_change(request):

    person = request.user

    if request.POST:
        form = PasswordChangeForm(data=request.POST, person=person)

        if form.is_valid():
            form.save()
            messages.success(request, "Password changed successfully")
            return HttpResponseRedirect(reverse('kg_profile'))
    else:
        form = PasswordChangeForm(person=person)

    return render(
        template_name='karaage/common/profile_password.html',
        context={'person': person, 'form': form},
        request=request)