wiring flask to db