Fix „get_app_list() takes 2 positional arguments but 3 were given“
This commit is contained in:
parent
c55fbb9dca
commit
0fbfb1e3cd
1 changed files with 2 additions and 2 deletions
|
@ -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
|
# 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
|
# 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
|
Return a sorted list of all the installed apps that have been
|
||||||
registered in this site.
|
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.
|
# 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()))
|
app_list = sorted(app_dict.values(), key=lambda x: locale.strxfrm('!') if (x['name'] == "Seminar") else locale.strxfrm(x['name'].lower()))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue