diff --git a/timed/admin.py b/timed/admin.py index 0fedc4fc..83f689e7 100644 --- a/timed/admin.py +++ b/timed/admin.py @@ -1,12 +1,13 @@ from django.conf import settings from django.contrib.admin import AdminSite +from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache class TimedAdminSite(AdminSite): login_template = "login.html" - @never_cache + @method_decorator(never_cache) def login(self, request, extra_context=None): extra = {"show_local_login": settings.ALLOW_LOCAL_LOGIN}