# Log view refactoring

* refactors log views to inherit from BaseView
This commit is contained in:
2025-10-21 14:56:26 +02:00
parent 971e3f20c8
commit 00109b6bfd
5 changed files with 30 additions and 53 deletions

View File

@@ -5,19 +5,11 @@ Contact: ksp-servicestelle@sgdnord.rlp.de
Created on: 19.08.22
"""
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.contrib.auth.mixins import LoginRequiredMixin
from intervention.models import Intervention
from konova.decorators import shared_access_required, default_group_required
from konova.views.log import AbstractLogView
class InterventionLogView(AbstractLogView):
model = Intervention
@method_decorator(login_required)
@method_decorator(default_group_required)
@method_decorator(shared_access_required(Intervention, "id"))
def dispatch(self, request, *args, **kwargs):
return super().dispatch(request, *args, **kwargs)
class InterventionLogView(LoginRequiredMixin, AbstractLogView):
_MODEL_CLS = Intervention