From 3743f7056dcdbe1a16a00418ea10ebef2669cf61 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 15 Nov 2023 20:34:41 -0700 Subject: initial structure --- app/main/__init__.py | 5 +++++ app/main/routes.py | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 app/main/__init__.py create mode 100644 app/main/routes.py (limited to 'app/main') diff --git a/app/main/__init__.py b/app/main/__init__.py new file mode 100644 index 0000000..3b580b0 --- /dev/null +++ b/app/main/__init__.py @@ -0,0 +1,5 @@ +from flask import Blueprint + +bp = Blueprint('main', __name__) + +from app.main import routes diff --git a/app/main/routes.py b/app/main/routes.py new file mode 100644 index 0000000..8657ddb --- /dev/null +++ b/app/main/routes.py @@ -0,0 +1,12 @@ +from flask import render_template +from flask_login import login_required, current_user +from app.main import bp + +@bp.route('/') +def index(): + return render_template('index.html') + +@bp.route('/dashboard') +@login_required +def dashboard(): + return render_template('main/dashboard.html', name=current_user.name) -- cgit v1.2.3