On Jan 10, 2012, at 6:04 AM, Jim Steil wrote:

> I'm looking for input on how people manage their database connection when 
> setting up your app in a Mercurial repository.
> 
> If I just add my app and db.py to my repository, then every time I setup a 
> different development machine to access it, the app will, by default, point 
> to the same database.  But, this database connection isn't correct when I'm 
> working on my laptop or from a home workstation and therefore, I need a 
> different way to specify my db connection info.
> 
> The solution I've come up with is to have a config file (using configobj) 
> hold my db information, and read it in db.py to get the info.  But, then this 
> causes even more overhead on each request.
> 
> Also, what do you do about your databases sub-directory?  I would think that 
> I don't want to track any changes there, but when my repo gets cloned an 
> empty databases directory should be placed there.

web2py should create the databases subdirectory for you if it's not there (at 
the beginning of the first request).

Reply via email to