flask config to accept all connections, psycopg2 old versions compat