def post(self, request):
        """ Handle login form send
        :param request: the request object
        :return: response object
        """
        form = self.form_class(request.POST)
        if form.is_valid():
            user = authenticate(username=form.cleaned_data['username'], password=form.cleaned_data['password'])
            if user is not None:
                if user.is_active:
                    login(request, user)
                    messages.success(request, user.username % _("Login successful for %s."))
                else:
                    msg = _("The account is disabled. Please use the contact form for more information.")
                    messages.warning(request, msg)
            else:
                msg = _("Unfortunately the username or password are not correct. "
                        "If you have forgotten your password use the link below the form to recover it.")
                messages.warning(request, msg)
        else:
            messages.warning(request, _("Please fill in all login form fields."))
            request.session['login_form_post'] = request.POST
        return redirect(form.cleaned_data['redirect'])
dataset/ETHPy150Open Wtower/django-ninecms/ninecms/views.py/LoginView.post/swapped operands of `%`