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 -2
View File
@@ -1,7 +1,8 @@
from flask.ext.script import Manager, prompt_bool
from api import app, db, esales
from api import create_app, db, esales
from api.models import Designer
app = create_app()
manager = Manager(app)
@@ -30,7 +31,7 @@ def seed_db():
def run_esales_import():
print("Importing products and categories into eSales")
pattern = "{}/*.xml".format(app.config.get("ESALES_IMPORT_DIR"))
esales.import_products_and_categories(pattern)
esales.cluster.import_products_and_categories(pattern)
if __name__ == '__main__':
manager.run()