Flask app for microblog using postgresql database