init
This commit is contained in:
15
routes/main.py
Normal file
15
routes/main.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from flask import Blueprint, render_template, session, redirect, url_for
|
||||
|
||||
main_bp = Blueprint('main', __name__)
|
||||
|
||||
@main_bp.route('/')
|
||||
def index():
|
||||
if 'user_id' not in session:
|
||||
return redirect(url_for('auth.login'))
|
||||
return render_template('main/index.html')
|
||||
|
||||
@main_bp.route('/dashboard')
|
||||
def dashboard():
|
||||
if 'user_id' not in session:
|
||||
return redirect(url_for('auth.login'))
|
||||
return render_template('main/dashboard.html')
|
||||
Reference in New Issue
Block a user