> Are you setting web.config.db_parameters?
>
> like this:
> web.config.db_parameters = dict(dbn='postgres', db="TestDatabase",
> user='developer', pw='my_dev_password')
Yeah, except that my parameters come from the settings.py file:
web.config.db_parameters = dict(dbn=settings.db_server, \
user=settings.db_username, \
pw=settings.db_password, \
db=settings.db_server_instance)
I was working with the connection problem. I wrote a script that would
connect to the db using only psycopg, and I found out that (in my
current setup) I need to pass the "host='localhost'" as part of the
connection string.
---------------- test_pg.py ------------
import psycopg2
try:
conn = psycopg2.connect("dbname='TestDatabase' user='developer'
host='localhost' password='my_dev_password'")
print "Connected"
except:
print "I am unable to connect to the database"
--------------------------------------------------------------------------------
I can connect using this script, but if I remove the "host" part, it
fails.
Now, I don't know which is the "right" way to fix this. I don't know
if I web.py needs to add a host parameter (maybe it already has and I
didn't check it) to web.config_db, or if I need to change some
configuration file in postgresql.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---