Admin strxfrm mac #81

Open
ticvac wants to merge 2 commits from strxfrm_pro_mac into master
  1. 3
      mamweb/admin.py

3
mamweb/admin.py

@ -56,8 +56,11 @@ def get_app_list(self, request, app_label=None):
# Sort the models alphabetically within each app. # Sort the models alphabetically within each app.
try: # na macu nefunguje locale.strxfrm :-/ proto je tu try except block
for app in app_list: for app in app_list:
app['models'].sort(key=lambda x: locale.strxfrm(x['name'].lower())) 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 return app_list

Loading…
Cancel
Save