1. David Larlet
  2. django-storages
  3. Pull requests

Pull requests

#23 Merged
Repository
ryankask
Branch
default
Repository
david
Branch
default

HashPathStorage should use its location attribute

Author
  1. Ryan Kaskel
Reviewers
Description

Hi David. Thanks for accepting my last patch regarding the HashPathStorage tests. Unfortunately I left a little bit out.

Django's FileSystemStorage allows you to pass a location argument to __init__. My last patch incorrectly assumed that HashPathStorage would use its location attribute when creating files. (see https://code.djangoproject.com/browser/django/tags/releases/1.3.1/django/core/files/storage.py#L150)

A side effect of this issue is that the tests currently leave junk in settings.MEDIA_ROOT.

My little patch fixes that.

This won't affect anyone (unless they previously passed the argument but didn't noticed it had no effect) because location will by default by settings.MEDIA_ROOT, which is what save used to use.

Comments (1)