Flask app, database connection and models