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 host
Since I use automation for deployment (fabric), I overwrite a 0_db.py model
file.
I create a file in the models, and never commit it, called 0-
settings.py, that goes
w2p_settings['dbcon'] = 'whatevent://me:mypass@myhost/mydb'
then, on db.py
try:
db = DAL(w2p_settings['dbcon'])
except NameError:
db = DAL('somedb://someotherguy:hispassword@otherhost/somedb')
this has so
Ross
That's all I'm looking for is what others are doing to manage the
situation. I should have specified that I'm using MySQL. When I'm at
the office, it is a different server on the network. When at home or on
my laptop I'm running a local copy of MySQL.
Before web2py I was using TurboG
On my dev machines, I'm using SQLite, so the database is the same
regardless of what machine I'm using. In your case, you could set your
db.py file to detect your machine's host name and use the appropriate DAL
string accordingly.
For example:
import socket
hostname = socket.gethostname()
if
5 matches
Mail list logo