Exemplo n.º 1
0
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))
Exemplo n.º 2
0
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))
Exemplo n.º 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)
Exemplo n.º 4
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_to_response(
        'common/profile_password.html',
        {'person': person, 'form': form},
        context_instance=RequestContext(request))
Exemplo n.º 5
0
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))
Exemplo n.º 6
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)