from app import create_app from flask import render_template, session, redirect app = create_app() @app.route('/') def index(): if 'user_id' not in session: return redirect('/auth/login') return render_template('index.html', user=session) if __name__ == '__main__': app.run(debug=True)