diff --git a/mamweb/admin.py b/mamweb/admin.py index a58df505..8a5f16af 100644 --- a/mamweb/admin.py +++ b/mamweb/admin.py @@ -56,8 +56,11 @@ def get_app_list(self, request, app_label=None): # Sort the models alphabetically within each app. - for app in app_list: - app['models'].sort(key=lambda x: locale.strxfrm(x['name'].lower())) + 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: + pass # locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení return app_list