logger done
This commit is contained in:
parent
ddd12b684d
commit
9c4c60765e
1 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@ import locale
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.admin import AdminSite
|
from django.contrib.admin import AdminSite
|
||||||
from django.contrib.flatpages.models import FlatPage
|
from django.contrib.flatpages.models import FlatPage
|
||||||
|
import logging
|
||||||
|
|
||||||
# Note: we are renaming the original Admin and Form as we import them!
|
# Note: we are renaming the original Admin and Form as we import them!
|
||||||
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
|
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
|
||||||
|
@ -60,7 +61,9 @@ def get_app_list(self, request, app_label=None):
|
||||||
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:
|
except OSError:
|
||||||
pass # locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení
|
# locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
logger.error('locale.strxfrm nefunguje na macu... :-/ -> neprovede se řazení')
|
||||||
|
|
||||||
return app_list
|
return app_list
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue