mirror of
https://github.com/django/django.git
synced 2025-11-23 12:26:57 +00:00
Fixed #17806 -- Fixed off-by-n error in the CachedStaticFilesStorage that prevented it from finding files in nested directories. Many thanks to lpetre.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
746987f916
commit
e88a65660f
3 changed files with 6 additions and 2 deletions
|
|
@ -160,7 +160,7 @@ class CachedFilesMixin(object):
|
|||
if sub_level:
|
||||
if sub_level == 1:
|
||||
parent_level -= 1
|
||||
start, end = parent_level, sub_level - 1
|
||||
start, end = parent_level, 1
|
||||
else:
|
||||
start, end = 1, sub_level - 1
|
||||
joined_result = '/'.join(name_parts[:-start] + url_parts[end:])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue