21 lines
458 B
Python
21 lines
458 B
Python
|
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')
|