fix get_app_list

This commit is contained in:
2023-01-07 11:43:34 +00:00
parent a2ae24d0ae
commit 5a8d993cbb

View File

@@ -37,13 +37,13 @@ class CustomFlatPageAdmin(FlatPageAdmin):
# Set the ordering of models in Admin Dashboard
def get_app_list(self, request):
def get_app_list(self, request, app_label=None):
"""
Return a sorted list of all the installed apps that have been
registered in this site.
"""
# Retrieve the original list
app_dict = self._build_app_dict(request)
app_dict = self._build_app_dict(request, app_label)
app_list = sorted(app_dict.values(), key=lambda x: x["name"].lower())
# Sort the models customably within each app.