Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #17462: Adjusted staticfiles CachedFilesMixin code so its tests…

… pass on Windows.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b04578372930431827019a821ff946b36db3256d 1 parent 5df784a
Karen Tracey kmtracey authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/contrib/staticfiles/storage.py
4 django/contrib/staticfiles/storage.py
View
@@ -102,7 +102,7 @@ def url(self, name, force=False):
cache_key = self.cache_key(name)
hashed_name = self.cache.get(cache_key)
if hashed_name is None:
- hashed_name = self.hashed_name(name)
+ hashed_name = self.hashed_name(name).replace('\\', '/')
# set the cache if there was a miss (e.g. if cache server goes down)
self.cache.set(cache_key, hashed_name)
return unquote(super(CachedFilesMixin, self).url(hashed_name))
@@ -121,7 +121,7 @@ def converter(matchobj):
# Completely ignore http(s) prefixed URLs
if url.startswith(('http', 'https')):
return matched
- name_parts = name.split('/')
+ name_parts = name.split(os.sep)
# Using posix normpath here to remove duplicates
url = posixpath.normpath(url)
url_parts = url.split('/')
Please sign in to comment.
Something went wrong with that request. Please try again.