I connect to an external DB in one of my models: my_model.db:
my_db = DAL( 'postgres://use:password@url/database', pool_size=20, after_connection=lambda self: self.execute('set search_path to my_schema, other_schema, public; set statement_timeout to 60000;'), migrate=False ) Now we are planning to adding the project to a git repository and I would now like to store our password there. I though about just creating the connection string by reading the .pgpass file. It will probably work but it seems unnecessary to read .pgpass every request. What is the best way to load the password at startup but not all other requests? Maybe just create in if statement? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.