Add app model sorting for finance and alphabet sorting for others
This commit is contained in:
@@ -74,6 +74,18 @@ def get_app_list(self, request, app_label=None):
|
|||||||
}
|
}
|
||||||
app["models"].sort(key=lambda x: ordering[x["name"]])
|
app["models"].sort(key=lambda x: ordering[x["name"]])
|
||||||
|
|
||||||
|
elif app["app_label"] == "finance":
|
||||||
|
ordering = {
|
||||||
|
"Rechnungen": 1,
|
||||||
|
"Wiref Formulare": 2,
|
||||||
|
"Beschlüsse": 3,
|
||||||
|
"Bankdaten": 4,
|
||||||
|
}
|
||||||
|
app["models"].sort(key=lambda x: ordering[x["name"]])
|
||||||
|
|
||||||
|
else:
|
||||||
|
app["models"].sort(key=lambda x: x["name"])
|
||||||
|
|
||||||
return app_list
|
return app_list
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user