# Index views

* refactors index view methods into classes
* introduces AbstractIndexView as base class
This commit is contained in:
2025-12-14 16:00:40 +01:00
parent 4c4d64cc3d
commit fdf3adf5ae
9 changed files with 140 additions and 124 deletions

View File

@@ -14,7 +14,8 @@ from intervention.views.deduction import NewInterventionDeductionView, EditInter
RemoveInterventionDeductionView
from intervention.views.document import NewInterventionDocumentView, GetInterventionDocumentView, \
RemoveInterventionDocumentView, EditInterventionDocumentView
from intervention.views.intervention import index_view, new_view, new_id_view, detail_view, edit_view, remove_view
from intervention.views.intervention import new_view, new_id_view, detail_view, edit_view, remove_view, \
IndexInterventionView
from intervention.views.log import InterventionLogView
from intervention.views.record import InterventionRecordView
from intervention.views.report import report_view
@@ -25,7 +26,7 @@ from intervention.views.share import InterventionShareFormView, InterventionShar
app_name = "intervention"
urlpatterns = [
path("", index_view, name="index"),
path("", IndexInterventionView.as_view(), name="index"),
path('new/', new_view, name='new'),
path('new/id', new_id_view, name='new-id'),
path('<id>', detail_view, name='detail'),