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.

51 lines
1.1 KiB
Python

from flask import (Flask,render_template)
import os
from .db_interface import get_connection_details, check_connection
def create_app(test_config=None):
# create and configure the app
app = Flask(__name__, instance_relative_config=True)
app.config.from_mapping(
SECRET_KEY='6e674d6e41b733270fd01c6257b3a1b4769eb80f3f773cd0fe8eff25f350fc1f',
POSTGRES_DB="aact_db",
POSTGRES_USER="root",
POSTGRES_HOST="localhost",
POSTGRES_PORT=5432,
POSTGRES_PASSWORD="root",
)
# ensure the instance folder exists
try:
os.makedirs(app.instance_path)
except OSError:
pass
# a simple page that says hello
@app.route('/')
def hello():
return render_template("index.html")
@app.route('/debug')
def debug_info():
return {
"connection": get_connection_details(),
}
from . import db_interface
#db_interface.check_connection(app)
from . import formularies_matching
app.register_blueprint(formularies_matching.bp)
return app