I just put an entry in /etc/hosts on my mac to resolve the database
server hostname to 127.0.0.1.  That way I'm not changing anything at
all that may later in a quick bug-fix -> deploy mode I might miss.
That way the connect string is always the same.  I run my apps on EC2
using the RDS so the hostname of the DB server is always the same.

On Jan 10, 9:04 am, Jim Steil <j...@qlf.com> wrote:
> Hi
>
> 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.
>
>      -Jim

Reply via email to