Import the entire post_init.py file removing the need to seprate init_ prefixed functions
This commit is contained in:
@@ -11,9 +11,8 @@ from .models import DocumentVersion, get_filename_from_uuid
|
||||
from .settings import STORAGE_BACKEND, CACHE_PATH
|
||||
|
||||
|
||||
def init_validate_cache_path():
|
||||
if (validate_path(CACHE_PATH) == False) or (not CACHE_PATH):
|
||||
setattr(document_settings, 'CACHE_PATH', tempfile.mkdtemp())
|
||||
#TODO: fix with method to set a settings value
|
||||
if (validate_path(CACHE_PATH) == False) or (not CACHE_PATH):
|
||||
setattr(document_settings, 'CACHE_PATH', tempfile.mkdtemp())
|
||||
|
||||
def init_set_storage_backend():
|
||||
DocumentVersion._meta.get_field('file').storage=STORAGE_BACKEND()
|
||||
DocumentVersion._meta.get_field('file').storage=STORAGE_BACKEND()
|
||||
|
||||
Reference in New Issue
Block a user