Hi Change
dbpg = DAL('postgres://dlawrence_test1:****@localhost/dlawrence_test1') to: dbpg = SQLDB('postgres://dlawrence_test1:****@localhost:5432/dlawrence_test1') Regards. --- On Sat, 4/16/11, Dave <dlawre...@focusedconcepts.com> wrote: > From: Dave <dlawre...@focusedconcepts.com> > Subject: [web2py] Unable to create DAL connection to PostgreSQL on WebFaction > To: "web2py-users" <web2py@googlegroups.com> > Date: Saturday, April 16, 2011, 4:15 PM > I am building my website using web2py > on WebFaction. I have a > PostgreSQL database on WebFaction called dlawrence_test1. > > When I attempt to create a connection to that database > using the > web2py shell as described in the manual, the command > executes without > any errors. But when I try to access the connection > variable, an error > message reports that the connection variable is not > defined. > > Can anyone explain this and tell me what I am doing > incorrectly? Thank > you. > > [note: my database password is represented by ****] > > ------- web2py shell ----- > In[0]: dbpg = > DAL('postgres://dlawrence_test1:****@localhost/ > dlawrence_test1') > > Out[0]: > > In[1]: print dbpg._name > > Out[1]: > Traceback (most recent call last): > File "<input>", line 1, in <module> > NameError: name 'dbpg' is not defined > >