# Remove view

* 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
This commit is contained in:
2025-12-14 17:37:01 +01:00
parent a2bda8d230
commit 1af807deae
19 changed files with 235 additions and 176 deletions
+20
View File
@@ -0,0 +1,20 @@
"""
Author: Michel Peltriaux
Created on: 14.12.25
"""
from django.http import HttpRequest
from django.utils.decorators import method_decorator
from compensation.models import Compensation
from konova.decorators import shared_access_required
from konova.views.remove import AbstractRemoveView
class RemoveCompensationView(AbstractRemoveView):
_MODEL = Compensation
_REDIRECT_URL = "compensation:index"
@method_decorator(shared_access_required(Compensation, "id"))
def dispatch(self, request: HttpRequest, id: str, *args, **kwargs):
return super().dispatch(request, id, *args, **kwargs)