Move top import of setting

This commit is contained in:
Roberto Rosario
2012-09-27 01:55:22 -04:00
parent 87d27a6d7a
commit 647835d0f5
4 changed files with 13 additions and 4 deletions
+3 -1
View File
@@ -6,7 +6,6 @@ import logging
from django.utils.encoding import smart_str
from common.settings import TEMPORARY_DIRECTORY
from common.textparser import TextParser, TEXT_PARSER_MIMETYPES
from mimetype.api import get_mimetype
@@ -34,6 +33,8 @@ def cache_cleanup(input_filepath, *args, **kwargs):
def create_image_cache_filename(input_filepath, *args, **kwargs):
from common.settings import TEMPORARY_DIRECTORY
if input_filepath:
hash_value = HASH_FUNCTION(u''.join([HASH_FUNCTION(smart_str(input_filepath)), unicode(args), unicode(kwargs)]))
return os.path.join(TEMPORARY_DIRECTORY, hash_value)
@@ -43,6 +44,7 @@ def create_image_cache_filename(input_filepath, *args, **kwargs):
def convert(input_filepath, output_filepath=None, cleanup_files=False, mimetype=None, *args, **kwargs):
from .runtime import backend
from common.settings import TEMPORARY_DIRECTORY
size = kwargs.get('size')
file_format = kwargs.get('file_format', DEFAULT_FILE_FORMAT)