* 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
21 lines
592 B
Python
21 lines
592 B
Python
"""
|
|
Author: Michel Peltriaux
|
|
Created on: 14.12.25
|
|
|
|
"""
|
|
from django.utils.decorators import method_decorator
|
|
|
|
from ema.models import Ema
|
|
from konova.decorators import shared_access_required, conservation_office_group_required
|
|
from konova.views.remove import AbstractRemoveView
|
|
|
|
|
|
class RemoveEmaView(AbstractRemoveView):
|
|
_MODEL = Ema
|
|
_REDIRECT_URL = "ema:index"
|
|
|
|
@method_decorator(conservation_office_group_required)
|
|
@method_decorator(shared_access_required(Ema, "id"))
|
|
def dispatch(self, request, *args, **kwargs):
|
|
return super().dispatch(request, *args, **kwargs)
|