#249 Created as modified

* fills modified attribute on new entries with created value automatically
* adds default ordering by last modified on table overviews
This commit is contained in:
2022-11-25 08:27:42 +01:00
parent 7438cb34d1
commit bfbe1085b2
12 changed files with 16 additions and 0 deletions

View File

@@ -270,6 +270,7 @@ class NewInterventionForm(BaseForm):
responsible=responsibility_data,
legal=legal_data,
created=action,
modified=action,
comment=comment,
)

View File

@@ -45,6 +45,8 @@ def index_view(request: HttpRequest):
deleted=None, # not deleted
).select_related(
"legal"
).order_by(
"-modified__timestamp"
)
table = InterventionTable(
request=request,