nenuscanner/routes/__init__.py

22 lines
524 B
Python

from flask import Blueprint, render_template
from .. import db
from . import object, calibration
blueprint = Blueprint('routes', __name__)
# Generic routes
@blueprint.route("/")
def index():
"""
Serves the index of nenuscanner.
"""
conn = db.get()
projects = db.Object.all_by_project(conn)
return render_template('index.html', projects=projects)
blueprint.register_blueprint(object.blueprint, url_prefix='/object')
blueprint.register_blueprint(calibration.blueprint, url_prefix='/calibration')