Implement class based converter transformations

This commit is contained in:
Roberto Rosario
2015-06-07 05:29:31 -04:00
parent f4752a3f3f
commit b256758db2
10 changed files with 212 additions and 231 deletions
+1 -14
View File
@@ -4,20 +4,7 @@ import logging
from django.utils.module_loading import import_string
from .exceptions import OfficeBackendError
from .office_converter import OfficeConverter
from .settings import GRAPHICS_BACKEND
logger = logging.getLogger(__name__)
logger.debug('initializing office backend')
try:
office_converter = OfficeConverter()
except OfficeBackendError as exception:
logger.error('error initializing office backend; %s', exception)
office_converter = None
else:
logger.debug('office_backend initialized')
backend = import_string(GRAPHICS_BACKEND)()
backend = converter_class = import_string(GRAPHICS_BACKEND)