the application was rewritten a bit to be more testable

This commit is contained in:
Martin
2016-06-28 18:59:20 +02:00
parent 27542b9ebb
commit 2edf0ba8b0
14 changed files with 122 additions and 54 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
# coding=utf-8
from api import app
from flask import current_app
from api.models.locale import Locale
from esales.models import Category, CategoryTree
from esales.utils import ImportFile
@@ -25,7 +25,7 @@ def update_designer(designer):
tree.add_category(category)
importfile.add_operation("update", tree)
directory = app.config.get("ESALES_IMPORT_DIR")
directory = current_app.config.get("ESALES_IMPORT_DIR")
importfile.write(directory)
@@ -46,5 +46,5 @@ def update_category(category):
))
importfile.add_operation("update", tree)
directory = app.config.get("ESALES_IMPORT_DIR")
directory = current_app.config.get("ESALES_IMPORT_DIR")
importfile.write(directory)