konova/intervention/views/resubmission.py
mpeltriaux 096385a9eb Resubmission class view
* adds AbstractResubmissionView to konova app
    * implemented for all major data types
    * replaces function based views
2022-08-19 10:47:59 +02:00

26 lines
936 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 default_group_required, shared_access_required
from konova.views.resubmission import AbstractResubmissionView
class InterventionResubmissionView(AbstractResubmissionView):
model = Intervention
redirect_url_base = "intervention:detail"
form_action_url_base = "intervention:resubmission-create"
@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)