> In the controller default.py I have the following code
>     *# Connect to a local postgres instance*
> *    db = DAL(**"postgres://user@localhost/DBName"**)*

You should not re-create the db object in the controller, as it has already 
been created in the model file. The code in the model files runs on every 
request (unless you use the conditional models functionality), so anything 
defined in the models will be available in the controller. You are creating 
a fresh db object in the controller, so none of the tables defined in the 
models will be there any longer.


- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to