mirror of
https://github.com/StefBuwalda/WebTech.git
synced 2025-10-30 19:29:58 +00:00
IDK 1234
This commit is contained in:
9
app.py
9
app.py
@@ -1,11 +1,16 @@
|
||||
from application import app
|
||||
from flask import render_template
|
||||
from flask import redirect, url_for
|
||||
from flask_login import current_user, login_required
|
||||
|
||||
|
||||
# home route
|
||||
@app.route("/")
|
||||
@login_required
|
||||
def index():
|
||||
return render_template("home.html")
|
||||
if current_user.is_authenticated:
|
||||
return redirect(url_for("application.dash"))
|
||||
else:
|
||||
return redirect(url_for("application.auth"))
|
||||
|
||||
|
||||
# App deployment
|
||||
|
||||
Reference in New Issue
Block a user