From 5a16046eddc753b752c5ab1fdb91595adf588a6b Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Mon, 13 Nov 2023 10:55:39 -0500 Subject: Add sample file upload for "load_data" blueprint Also add a success page that redirects to the Dashboard --- ustayml/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ustayml/__init__.py') diff --git a/ustayml/__init__.py b/ustayml/__init__.py index 135ef57..fbe1b3a 100644 --- a/ustayml/__init__.py +++ b/ustayml/__init__.py @@ -11,6 +11,8 @@ def create_app(test_config=None): app.config.from_mapping( SECRET_KEY='dev', DATABASE=os.path.join(app.instance_path, 'ustayml.sqlite'), + DATASET_PATH=os.path.join(app.instance_path, 'dataset'), + STUDENT_DATA_PATH=os.path.join(app.instance_path, 'student'), ) if test_config is None: @@ -32,14 +34,13 @@ def create_app(test_config=None): from . import db db.init_app(app) - from .views import auth - app.register_blueprint(auth.bp) - # from .views import blog # app.register_blueprint(blog.bp) - from .views import students + from .views import auth, students, load_data + app.register_blueprint(auth.bp) app.register_blueprint(students.bp) + app.register_blueprint(load_data.bp) # Extra app.add_url_rule('/', endpoint='index') -- cgit v1.2.3