the application was rewritten a bit to be more testable
This commit is contained in:
+3
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user