From 3a5f9cd1ae8a2c7101f141d9730878abb74ec92f Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 12 Mar 2012 20:28:09 +0000 Subject: Fixed #17861 -- Took care of special characters when creating the staticfiles storage cache keys. Many thanks to Preston Holmes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17688 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/staticfiles/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/contrib/staticfiles/storage.py b/django/contrib/staticfiles/storage.py index fe35a3163e..97e7e9c494 100644 --- a/django/contrib/staticfiles/storage.py +++ b/django/contrib/staticfiles/storage.py @@ -95,7 +95,7 @@ class CachedFilesMixin(object): return urlunsplit(unparsed_name) def cache_key(self, name): - return u'staticfiles:cache:%s' % name + return u'staticfiles:%s' % hashlib.md5(smart_str(name)).hexdigest() def url(self, name, force=False): """ -- cgit v1.3