On 16 April 2011 21:15, Dave <[email protected]> wrote:
> 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
>
>
Did you create the PostgreSQL database?
Regards
Johann
--
May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord! His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
2 Pet. 1:2b,3a