Import the entire post_init.py file removing the need to seprate init_ prefixed functions

This commit is contained in:
Roberto Rosario
2012-09-26 22:32:34 -04:00
parent 11aa9e64f1
commit 7cebb82e1c
12 changed files with 160 additions and 108 deletions

View File

@@ -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()