blob: a236cab3f8eb05f03adfbabe807978342c12eb8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
from django.conf import DEFAULT_STORAGE_ALIAS
from django.utils.functional import LazyObject
from .base import Storage
from .filesystem import FileSystemStorage
from .handler import InvalidStorageError, StorageHandler
from .memory import InMemoryStorage
__all__ = (
"FileSystemStorage",
"InMemoryStorage",
"Storage",
"DefaultStorage",
"default_storage",
"InvalidStorageError",
"StorageHandler",
"storages",
)
class DefaultStorage(LazyObject):
def _setup(self):
self._wrapped = storages[DEFAULT_STORAGE_ALIAS]
storages = StorageHandler()
default_storage = DefaultStorage()
|