From 5e4487a99f357c08662ed5dabd0c7f21664c15eb Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Mon, 13 Nov 2023 12:42:36 -0500 Subject: Add site index and sample dashboard BP --- ustayml/__init__.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'ustayml/__init__.py') diff --git a/ustayml/__init__.py b/ustayml/__init__.py index fbe1b3a..9e57bc4 100644 --- a/ustayml/__init__.py +++ b/ustayml/__init__.py @@ -1,6 +1,6 @@ import os -from flask import Flask +from flask import Flask, render_template def create_app(test_config=None): @@ -25,24 +25,24 @@ def create_app(test_config=None): except OSError: pass - # Routes - @app.route('/hello') - def hello(): - return 'Hello, World!' - - # Register functions and blueprints from . import db db.init_app(app) - # from .views import blog - # app.register_blueprint(blog.bp) + # Register functions and blueprints - from .views import auth, students, load_data + @app.route('/') + def index(): + return render_template('index.html') + + from .views import ( + auth, + students, load_data, dashboard + ) app.register_blueprint(auth.bp) app.register_blueprint(students.bp) app.register_blueprint(load_data.bp) + app.register_blueprint(dashboard.bp) - # Extra - app.add_url_rule('/', endpoint='index') + # app.add_url_rule('/', endpoint='index') return app \ No newline at end of file -- cgit v1.2.3