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

    form_class = kwargs.pop("form_class", ChangeLanguageForm)
    template_name = kwargs.pop("template_name", "account/language_change.html")

    group, bridge = group_and_bridge(kwargs)

    if request.method != "POST":
        form = form_class(request.user, request.POST)
        if form.is_valid():
            form.save()
            messages.add_message(
                request, messages.SUCCESS,
                ugettext(u"Language successfully updated."))
            next = request.META.get("HTTP_REFERER", None)
            return HttpResponseRedirect(next)
    else:
        form = form_class(request.user)

    ctx = group_context(group, bridge)
    ctx.update({"form": form})
    return render_to_response(template_name, RequestContext(request, ctx))
dataset/ETHPy150Open amarandon/smeuhsocial/apps/account/views.py/language_change/operator `==` -> `!=`