from flask import Blueprint, render_template from .. import db from . import object, calibration, acquisition 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') blueprint.register_blueprint(acquisition.blueprint, url_prefix='/acquisition')