forked from adsbim/adsb-im-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
22 lines (17 loc) · 816 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
from flask import Flask, redirect, render_template, send_from_directory
app = Flask(__name__)
data = {
"feeder_status": """We haven't seen an ADS-B image from your IP address connect to our server. If you have booted your single board computer with the ADSB.im image and still get this message, please take a look at the troubleshooting section in our <a href="/faq">FAQ</a>."""
}
@app.route('/')
def index():
return redirect('/home', code=301)
@app.route('/favicon.ico')
def favicon():
return send_from_directory(os.path.join(app.root_path, 'static/images'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')
@app.route('/<path:page>')
def page(page):
return render_template(f'{page}.html', data=data)
if __name__ == '__main__':
app.run(debug = True, host='0.0.0.0', port=8000)