* refactors new, edit, get and delete views for eiv, kom, oek and ema * introduces
38 lines
1.3 KiB
Python
38 lines
1.3 KiB
Python
"""
|
|
Author: Michel Peltriaux
|
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
|
Contact: ksp-servicestelle@sgdnord.rlp.de
|
|
Created on: 19.08.22
|
|
|
|
"""
|
|
from intervention.forms.modals.document import NewInterventionDocumentModalForm, EditInterventionDocumentModalForm, \
|
|
RemoveInterventionDocumentModalForm
|
|
from intervention.models import Intervention, InterventionDocument
|
|
from konova.views.document import AbstractNewDocumentView, AbstractGetDocumentView, AbstractRemoveDocumentView, \
|
|
AbstractEditDocumentView
|
|
|
|
|
|
class NewInterventionDocumentView(AbstractNewDocumentView):
|
|
_MODEL_CLS = Intervention
|
|
_DOCUMENT_MODEL = InterventionDocument
|
|
_FORM_CLS = NewInterventionDocumentModalForm
|
|
_REDIRECT_URL = "intervention:detail"
|
|
|
|
|
|
class GetInterventionDocumentView(AbstractGetDocumentView):
|
|
_MODEL_CLS = Intervention
|
|
_DOCUMENT_CLS = InterventionDocument
|
|
|
|
|
|
class RemoveInterventionDocumentView(AbstractRemoveDocumentView):
|
|
_MODEL_CLS = Intervention
|
|
_DOCUMENT_CLS = InterventionDocument
|
|
_FORM_CLS = RemoveInterventionDocumentModalForm
|
|
_REDIRECT_URL = "intervention:detail"
|
|
|
|
class EditInterventionDocumentView(AbstractEditDocumentView):
|
|
_MODEL_CLS = Intervention
|
|
_DOCUMENT_CLS = InterventionDocument
|
|
_FORM_CLS = EditInterventionDocumentModalForm
|
|
_REDIRECT_URL = "intervention:detail"
|