def get_defined_storage(self): try: return DefinedStorage.get(name=self.defined_storage_name) except KeyError: return DefinedStorage( dotted_path='', label=_('Unknown'), name='unknown' )
def setUp(self): super(CacheTestMixin, self).setUp() self.temporary_directory = mkdtemp() DefinedStorage( dotted_path='django.core.files.storage.FileSystemStorage', label='File caching test storage', name=STORAGE_NAME_FILE_CACHING_TEST_STORAGE, kwargs={'location': self.temporary_directory})
from django.utils.translation import ugettext_lazy as _ from mayan.apps.storage.classes import DefinedStorage from .literals import STORAGE_NAME_SOURCE_STAGING_FOLDER_FILE from .settings import ( setting_staging_file_image_cache_storage, setting_staging_file_image_cache_storage_arguments, ) storage_staging_folder_files = DefinedStorage( dotted_path=setting_staging_file_image_cache_storage.value, error_message=_( 'Unable to initialize the staging folder file image ' 'storage. Check the settings {} and {} for formatting ' 'errors.'.format( setting_staging_file_image_cache_storage.global_name, setting_staging_file_image_cache_storage_arguments.global_name ) ), label=_('Staging folder files'), name=STORAGE_NAME_SOURCE_STAGING_FOLDER_FILE, kwargs=setting_staging_file_image_cache_storage_arguments.value )
from django.utils.translation import ugettext_lazy as _ from mayan.apps.storage.classes import DefinedStorage from .literals import STORAGE_NAME_DOCUMENT_SIGNATURES_DETACHED_SIGNATURE from .settings import (setting_storage_backend, setting_storage_backend_arguments) storage_document_signatures_detached = DefinedStorage( dotted_path=setting_storage_backend.value, error_message=_('Unable to initialize the detached signatures ' 'storage. Check the settings {} and {} for formatting ' 'errors.'.format( setting_storage_backend.global_name, setting_storage_backend_arguments.global_name)), label=_('Detached signatures'), name=STORAGE_NAME_DOCUMENT_SIGNATURES_DETACHED_SIGNATURE, kwargs=setting_storage_backend_arguments.value)
from django.utils.translation import ugettext_lazy as _ from mayan.apps.storage.classes import DefinedStorage from .literals import (STORAGE_NAME_DOCUMENT_IMAGE, STORAGE_NAME_DOCUMENT_VERSION) from .settings import (setting_documentimagecache_storage, setting_documentimagecache_storage_arguments, setting_storage_backend, setting_storage_backend_arguments) storage_document_image_cache = DefinedStorage( dotted_path=setting_documentimagecache_storage.value, error_message=_( 'Unable to initialize the document image storage. Check ' 'the settings {} and {} for formatting errors.'.format( setting_documentimagecache_storage.global_name, setting_documentimagecache_storage_arguments.global_name)), label=_('Document images'), name=STORAGE_NAME_DOCUMENT_IMAGE, kwargs=setting_documentimagecache_storage_arguments.value) storage_document_versions = DefinedStorage( dotted_path=setting_storage_backend.value, error_message=_('Unable to initialize the document version storage. Check ' 'the settings {} and {} for formatting errors.'.format( setting_storage_backend.global_name, setting_storage_backend_arguments.global_name)), label=_('Document version files'), name=STORAGE_NAME_DOCUMENT_VERSION, kwargs=setting_storage_backend_arguments.value)
from django.utils.translation import ugettext_lazy as _ from mayan.apps.storage.classes import DefinedStorage from .literals import STORAGE_NAME_ASSETS from .settings import (setting_storage_backend, setting_storage_backend_arguments) storage_assets = DefinedStorage( dotted_path=setting_storage_backend.value, error_message=_('Unable to initialize the converter asset ' 'storage. Check the settings {} and {} for formatting ' 'errors.'.format( setting_storage_backend.global_name, setting_storage_backend_arguments.global_name)), label=_('Assets'), name=STORAGE_NAME_ASSETS, kwargs=setting_storage_backend_arguments.value)
from django.utils.translation import ugettext_lazy as _ from mayan.apps.storage.classes import DefinedStorage from .literals import STORAGE_NAME_WORKFLOW_CACHE from .settings import ( setting_workflowimagecache_storage, setting_workflowimagecache_storage_arguments, ) storage_workflow_image = DefinedStorage( dotted_path=setting_workflowimagecache_storage.value, error_message=_( 'Unable to initialize the workflow preview ' 'storage. Check the settings {} and {} for formatting ' 'errors.'.format( setting_workflowimagecache_storage.global_name, setting_workflowimagecache_storage_arguments.global_name)), label=_('Workflow preview images'), name=STORAGE_NAME_WORKFLOW_CACHE, kwargs=setting_workflowimagecache_storage_arguments.value)