1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

i18n: fixed a rather stupid bug in language discovery (sort descending by preference value instead ascending)

git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@762 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Georg Bauer 2005-10-01 16:45:16 +00:00
parent 009694db63
commit bd9cb4c9f4

View File

@ -200,7 +200,7 @@ def get_language_from_request(request):
return (lang, order)
langs = [_parsed(el) for el in accept.split(',')]
langs.sort(lambda a,b: cmp(a[1], b[1]))
langs.sort(lambda a,b: -1*cmp(a[1], b[1]))
globalpath = os.path.join(os.path.dirname(settings.__file__), 'locale')