# 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

@@ -17,13 +17,13 @@ from compensation.views.compensation.action import NewCompensationActionView, Ed
RemoveCompensationActionView
from compensation.views.compensation.state import NewCompensationStateView, EditCompensationStateView, \
RemoveCompensationStateView
from compensation.views.compensation.compensation import index_view, new_view, new_id_view, detail_view, edit_view, \
remove_view
from compensation.views.compensation.compensation import new_view, new_id_view, detail_view, edit_view, \
remove_view, IndexCompensationView
from compensation.views.compensation.log import CompensationLogView
urlpatterns = [
# Main compensation
path("", index_view, name="index"),
path("", IndexCompensationView.as_view(), name="index"),
path('new/id', new_id_view, name='new-id'),
path('new/<intervention_id>', new_view, name='new'),
path('new', new_view, name='new'),