konova/intervention/views/log.py
mpeltriaux 3c416fa264 Konova views
* splits konova/views.py into separate files in new module
    * view files can now be found in /konova/views/...
* introduces first class based view AbstractLogView
    * implemented for Ema, Intervention, Compensation and EcoAccount
2022-08-19 10:25:27 +02:00

24 lines
792 B
Python

"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
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 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)