I have defined the auth_table. And it does have username=True

But actually this makes me belatedly think,  the issue could be related to 
the various ways I am attempting to get the custom table to work with 
registration, and the multiple db changes that are occurring as I play 
around. So I think for now it would be best to wait for responses my other 
ticket, and see what comes of it before narrowing in on why that particular 
validator doesn't seem to recognize auth_user. Thanks so much for your 
assistance.

On Wednesday, June 6, 2018 at 10:03:21 AM UTC-4, Anthony wrote:
>
> I notice in another thread you indicated you have a custom auth_user 
> table. Presumably you either have not defined the auth_user table at this 
> point in the code, or you have named it something else.
>
> Anthony
>
> On Tuesday, June 5, 2018 at 3:38:40 PM UTC-4, b.l. masters wrote:
>>
>> Hi
>>
>> I am using a validator (that previously worked) in a db model, and which 
>> now will not recognize the 'auth_user' table in the IS_IN_DB validator:
>>
>> db.tablenamehere.username.requires = [IS_IN_DB(db, 'auth_user.username', 
>> error_message=T('User must already exist to associate with these 
>> services'))]
>>
>> I've pasted the error message below. Thanks for any help.
>>
>> --
>> <type 'exceptions.AttributeError'> 'DAL' object has no attribute 
>> 'auth_user' Version 
>> web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 
>> Python Python 2.7.3: /Applications/web2py.app/Contents/MacOS/python 
>> (prefix: /Applications/web2py.app/Contents/Resources) Traceback 
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>>
>>
>> Traceback (most recent call last):
>>   File "/Applications/web2py.app/Contents/Resources/gluon/restricted.py", 
>> line 227, in restricted
>>   File 
>> "/Applications/web2py.app/Contents/Resources/applications/whirllink/models/db.py"
>>  <http://127.0.0.1:8000/admin/default/edit/whirllink/models/db.py>, line 
>> 111, in <module>
>>   File 
>> "/Applications/web2py.app/Contents/Resources/gluon/packages/dal/pydal/base.py",
>>  line 914, in __getitem__
>>   File 
>> "/Applications/web2py.app/Contents/Resources/gluon/packages/dal/pydal/base.py",
>>  line 921, in __getattr__
>> AttributeError: 'DAL' object has no attribute 'auth_user'
>>
>>
>>

-- 
Resources:
- 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