2021-12-20 15:09:30 +00:00
|
|
|
"""
|
|
|
|
Main Flask-based app for Slinky
|
|
|
|
"""
|
|
|
|
from flask import Flask, render_template
|
|
|
|
from flask_bootstrap import Bootstrap
|
2021-12-19 11:48:42 +00:00
|
|
|
|
2021-12-28 15:15:08 +00:00
|
|
|
from slinky.web import protect, slinky_webapp
|
2021-12-19 11:48:42 +00:00
|
|
|
|
2021-12-20 15:09:30 +00:00
|
|
|
app = Flask(__name__)
|
|
|
|
app.register_blueprint(slinky_webapp)
|
2021-12-19 11:48:42 +00:00
|
|
|
|
2021-12-20 15:09:30 +00:00
|
|
|
Bootstrap(app)
|
2021-12-19 11:48:42 +00:00
|
|
|
|
|
|
|
|
2021-12-20 15:09:30 +00:00
|
|
|
@app.route('/')
|
2021-12-28 15:15:08 +00:00
|
|
|
@protect
|
2021-12-20 15:09:30 +00:00
|
|
|
def index() -> str:
|
|
|
|
"""
|
|
|
|
Index/Landing page
|
2021-12-19 11:48:42 +00:00
|
|
|
|
2021-12-20 15:09:30 +00:00
|
|
|
Returns:
|
|
|
|
str: string of page content
|
|
|
|
"""
|
|
|
|
return render_template('index.html')
|