You need:

auth.user_id.requires = IS_IN_DB(db, 'auth_user.id', '%(id)s')

I am hesitant to make this the default. I think it is usefult to see
the actual name of the user in the dropdown (current default)


On Nov 15, 9:29 pm, Wiiboy <jordon...@gmail.com> wrote:
> Ahh, on trying to DB-Admin the table auth_membership, I get this:
> Traceback (most recent call last):
>   File "/media/apps/web2py/gluon/restricted.py", line 184, in
> restricted
>     exec ccode in environment
>   File "/media/apps/web2py/applications/main/controllers/appadmin.py",
> line 261, in <module>
>   File "/media/apps/web2py/gluon/globals.py", line 103, in <lambda>
>     self._caller = lambda f: f()
>   File "/media/apps/web2py/applications/main/controllers/appadmin.py",
> line 109, in insert
>     form = SQLFORM(db[table], ignore_rw=ignore_rw)
>   File "/media/apps/web2py/gluon/sqlhtml.py", line 613, in __init__
>     inp = self.widgets.options.widget(field, default)
>   File "/media/apps/web2py/gluon/sqlhtml.py", line 199, in widget
>     options = requires0.options()
>   File "/media/apps/web2py/gluon/validators.py", line 348, in options
>     self.build_set()
>   File "/media/apps/web2py/gluon/validators.py", line 335, in
> build_set
>     records = self.dbset.select(*self.fields, **dd)
>   File "/media/apps/web2py/gluon/sql.py", line 2937, in select
>     return self.parse(db,rows,self.colnames)
>   File "/media/apps/web2py/gluon/sql.py", line 2956, in parse
>     field = table[fieldname]
>   File "/media/apps/web2py/gluon/sql.py", line 1497, in __getitem__
>     return dict.__getitem__(self, str(key))
> KeyError: 'first_name'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to