nenuscanner/app.py

29 lines
575 B
Python
Executable File

#!/usr/bin/env python
from flask import Flask, render_template, send_from_directory
from . import db
app = Flask(__name__)
@app.route("/")
def hello_world():
conn = db.get()
objects = db.Object.all(conn)
return render_template('index.html', objects=objects)
@app.route("/calibration")
def calibration():
return render_template('calibration.html')
@app.route('/static/<path:path>')
def send_static(path):
return send_from_directory('static', path)
@app.route('/data/<path:path>')
def send_data(path):
return send_from_directory('data', path)