* refactors remove view methods into classes * introduced AbstractRemoveView * disables final-delete actions from admin views * extends error warnings on RemoveEcoAccountModalForm * removes LoginRequiredMixin from AbstractPublicReportView to make it accessible for the public * updates translations
20 lines
552 B
Python
20 lines
552 B
Python
"""
|
|
Author: Michel Peltriaux
|
|
Created on: 14.12.25
|
|
|
|
"""
|
|
from django.utils.decorators import method_decorator
|
|
|
|
from intervention.models import Intervention
|
|
from konova.decorators import shared_access_required
|
|
from konova.views.remove import AbstractRemoveView
|
|
|
|
|
|
class RemoveInterventionView(AbstractRemoveView):
|
|
_MODEL = Intervention
|
|
_REDIRECT_URL = "intervention:index"
|
|
|
|
@method_decorator(shared_access_required(Intervention, "id"))
|
|
def dispatch(self, request, *args, **kwargs):
|
|
return super().dispatch(request, *args, **kwargs)
|