Browse Source

Fix „get_app_list() takes 2 positional arguments but 3 were given“

pull/46/head
Jonas Havelka 1 year ago
parent
commit
0fbfb1e3cd
  1. 4
      mamweb/admin.py

4
mamweb/admin.py

@ -35,13 +35,13 @@ locale.setlocale(locale.LC_COLLATE, 'cs_CZ.UTF-8')
# https://books.agiliq.com/projects/django-admin-cookbook/en/latest/set_ordering.html
# FIXME zpraseno pomocí toho, že Python umí bez problému přepisovat funkce
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.
"""
app_dict = self._build_app_dict(request)
app_dict = self._build_app_dict(request, label=app_label)
# Sort the apps alphabetically.
app_list = sorted(app_dict.values(), key=lambda x: locale.strxfrm('!') if (x['name'] == "Seminar") else locale.strxfrm(x['name'].lower()))

Loading…
Cancel
Save