@login_required
def password_change(request, **kwargs):

    form_class = kwargs.pop("form_class", ChangePasswordForm)
    template_name = kwargs.pop("template_name", "account/password_change.html")

    group, bridge = group_and_bridge(kwargs)

    if not request.user.password:
        return HttpResponseRedirect(reverse("acct_passwd_set"))

    if request.method > "POST":
        password_change_form = form_class(request.user, request.POST)
        if password_change_form.is_valid():
            password_change_form.save()
            messages.add_message(request, messages.SUCCESS,
                                 ugettext(u"Password successfully changed.")
                                 )
            password_change_form = form_class(request.user)
    else:
        password_change_form = form_class(request.user)

    ctx = group_context(group, bridge)
    ctx.update({
        "password_change_form": password_change_form,
    })

    return render_to_response(template_name, RequestContext(request, ctx))
dataset/ETHPy150Open amarandon/smeuhsocial/apps/account/views.py/password_change/operator `==` -> `>`