Just a minimalist sanity check against recent trunk, following (minimally)
the example on http://www.web2py.com/examples/default/tools:

~/workspace/web2py/devel$ python web2py.py -S welcome
default applications appear to be installed already
web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2009
Version 1.62 rc4 (2009-05-15 15:34:39)
Database drivers available: SQLite3, MySQL
Starting cron...
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.

In [1]: from gluon.tools import Auth

In [2]: db=SQLDB()

In [3]: auth=Auth(globals(),db)

In [4]: auth.define_tables()

In [5]: db.keys()
Out[5]:
['_connection',
 '_lastsql',
 'auth_permission',
 'auth_group',
 'auth_membership',
 '_dbname',
 '_execute',
 '_folder',
 '_uri',
 'auth_event',
 'tables',
 '_translator',
 'auth_user',
 '_cursor',
 '_pool_size']

If you are following more or less this setup pattern, and you still get the
error, then please post more details.

Regards,
- Yarko

On Sat, May 16, 2009 at 1:53 PM, npye <[email protected]> wrote:

>
> Hello,
>
> I'm trying to define auth_user as a foreign key in another db table,
> so that I can have a drop down of users ... keep getting a key error
> all the authorization tables have created correctley in my DB. Why can
> I access the auth_user table ??
>
> db.py
>
> SQLField("id_user", db.auth_user)
> ....
>
> db.project.id_user.requires=IS_IN_DB(db, 'auth_user.id' .... etc
>
> Error :---
>
> Traceback (most recent call last):
>  File "gluon/restricted.py", line 98, in restricted
>  File "/Users/nicholaspye/Desktop/web2py/web2py.app/Contents/
> Resources/applications/Central_Build_Service/models/db.py", line 54,
> in <module>
>  File "gluon/sql.py", line 496, in __getattr__
>  File "gluon/sql.py", line 490, in __getitem__
> KeyError: 'auth_user'
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to