Probably you are trying to access it before auth.define_tables()
On May 16, 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 -~----------~----~----~----~------~----~------~--~---

