Compare commits

..

No commits in common. "9a11491dcce6c4331b35c96404aaf1b8f3576ae1" and "d67d2f372b6f71aa50fdb813241be10fed83fd57" have entirely different histories.

View file

@ -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)
for app in app_list:
app['models'].sort(key=lambda x: locale.strxfrm(x['name'].lower()))
return app_list