prepend storage name to differentiate config options
This commit is contained in:
@@ -13,7 +13,7 @@ from storage.conf import settings
|
||||
class GridFSStorage(Storage):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.db = Connection(host=settings.GRIDFS_HOST,
|
||||
port=settings.GRIDFS_PORT)[settings.DATABASE_NAME]
|
||||
port=settings.GRIDFS_PORT)[settings.GRIDFS_DATABASE_NAME]
|
||||
self.fs = GridFS(self.db)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
|
||||
GRIDFS_HOST = getattr(settings, 'STORAGE_GRIDFS_HOST', 'localhost')
|
||||
GRIDFS_PORT = getattr(settings, 'STORAGE_GRIDFS_PORT', 27017)
|
||||
DATABASE_NAME = getattr(settings, 'STORAGE_GRIDFS_DATABASE_NAME', u'document_storage')
|
||||
GRIDFS_DATABASE_NAME = getattr(settings, 'STORAGE_GRIDFS_DATABASE_NAME', u'document_storage')
|
||||
|
||||
Reference in New Issue
Block a user