aboutsummaryrefslogtreecommitdiff
path: root/ustayml/__init__.py
diff options
context:
space:
mode:
authorMitsuo Tokumori <rtokumori@pucp.edu.pe>2023-11-13 12:42:36 -0500
committerMitsuo Tokumori <rtokumori@pucp.edu.pe>2023-11-13 12:42:36 -0500
commit5e4487a99f357c08662ed5dabd0c7f21664c15eb (patch)
tree3ece23ed5e17cd814d4aafad3defc73b4e204240 /ustayml/__init__.py
parent5a16046eddc753b752c5ab1fdb91595adf588a6b (diff)
Add site index and sample dashboard BP
Diffstat (limited to 'ustayml/__init__.py')
-rw-r--r--ustayml/__init__.py24
1 files changed, 12 insertions, 12 deletions
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