mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed a CacheKeyWarning under Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -165,7 +165,9 @@ def _i18n_cache_key_suffix(request, cache_key):
|
||||
# which in turn can also fall back to settings.LANGUAGE_CODE
|
||||
cache_key += '.%s' % getattr(request, 'LANGUAGE_CODE', get_language())
|
||||
if settings.USE_TZ:
|
||||
cache_key += '.%s' % get_current_timezone_name()
|
||||
# Windows uses non-standard timezone names that may include spaces,
|
||||
# which triggers CacheKeyWarning.
|
||||
cache_key += '.%s' % get_current_timezone_name().replace(' ', '_')
|
||||
return cache_key
|
||||
|
||||
def _generate_cache_key(request, method, headerlist, key_prefix):
|
||||
|
||||
Reference in New Issue
Block a user