You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
574 B
Python

from .models import *
from server.abstract_api import ApiError, register_api_object
from flask import Flask, render_template
def attach_to_flask(app: Flask):
@app.errorhandler(ApiError)
def handle_api_error(err: ApiError):
return err.to_response()
# register these as api accessible
register_api_object(app, Person)
register_api_object(app, Event)
register_api_object(app, Place)
register_api_object(app, Image)
register_api_object(app, VisitRel)
@app.route('/')
def home():
return render_template('start.html')