Added configurable location setting for file based storage

This commit is contained in:
Roberto Rosario
2011-03-07 23:46:09 -04:00
parent 3774a2cb5a
commit 13c4d1e751
3 changed files with 8 additions and 3 deletions

View File

@@ -1,7 +1,9 @@
from django.core.files.storage import FileSystemStorage
from storage.conf.settings import FILESTORAGE_LOCATION
class FileBasedStorage(FileSystemStorage):
def __init__(self, *args, **kwargs):
super(FileBasedStorage, self).__init__(*args, **kwargs)
self.location='document_storage'
self.location=FILESTORAGE_LOCATION