Translation support and minor login view changes #35

Open
rskthomas wants to merge 20 commits from feature/translation into main
Showing only changes of commit 7f0826c774 - Show all commits

View file

@ -1,5 +1,6 @@
import logging
from django.contrib import messages
from django.conf import settings
from django.urls import reverse_lazy
from django.contrib.auth import views as auth_views
@ -40,6 +41,10 @@ class LoginView(auth_views.LoginView):
return redirect(self.extra_context['success_url'])
def form_invalid(self, form):
messages.error(self.request, _("Login error. Check credentials."))
return self.render_to_response(self.get_context_data(form=form), status=401)
def LogoutView(request):
auth_logout(request)