diff options
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/cache.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/utils/cache.py b/django/utils/cache.py index 1015c2f277..0ea84072fa 100644 --- a/django/utils/cache.py +++ b/django/utils/cache.py @@ -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): |
