Innovenergy_trunk/frontend/app.py

21 lines
458 B
Python
Raw Normal View History

2023-02-16 12:57:06 +00:00
from flask import Flask
from flask_login import current_user, login_manager
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
login = login_manager
db = SQLAlchemy()
db.init_app(app)
login.init_app(app)
login.login_view = 'index.html'
@app.route('/')
def index():
if not current_user:
return render_themed_template('login.html')
return "<center>Hello World!</center>"
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')