Compare commits
No commits in common. "9a11491dcce6c4331b35c96404aaf1b8f3576ae1" and "d67d2f372b6f71aa50fdb813241be10fed83fd57" have entirely different histories.
9a11491dcc
...
d67d2f372b
1 changed files with 2 additions and 8 deletions
|
@ -7,7 +7,6 @@ import locale
|
|||
from django.contrib import admin
|
||||
from django.contrib.admin import AdminSite
|
||||
from django.contrib.flatpages.models import FlatPage
|
||||
import logging
|
||||
|
||||
# Note: we are renaming the original Admin and Form as we import them!
|
||||
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
|
||||
|
@ -57,13 +56,8 @@ def get_app_list(self, request, app_label=None):
|
|||
|
||||
|
||||
# Sort the models alphabetically within each app.
|
||||
try: # na macu nefunguje locale.strxfrm :-/ proto je tu try except block
|
||||
for app in app_list:
|
||||
app['models'].sort(key=lambda x: locale.strxfrm(x['name'].lower()))
|
||||
except OSError as e:
|
||||
# locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.error(e)
|
||||
|
||||
return app_list
|
||||
|
||||
|
|
Loading…
Reference in a new issue