Thanks Niphlod!
On Wednesday, May 15, 2013 5:50:59 PM UTC-4, Niphlod wrote:
>
> that you need to define the office table before the auth ones ^_^
>
> On Wednesday, May 15, 2013 9:29:44 PM UTC+2, Naujpr wrote:
>>
>> Hello everyone. This is probably simple (noob here) but I'm kinda lost
>> here. I am trying to establish a one to many relationship between the
>> auth_user table and an office table.
>>
>> I have defined an office table:
>>
>> db.define_table('office',
>> Field('name', 'string', notnull=True, unique=True),
>> format='%(name)s'
>> )
>>
>> in db.py I have (before auth.define_tables(username=False,
>> signature=False)):
>>
>> auth.settings.extra_fields['auth_user']=[
>> Field('office', db.office)
>> ]
>>
>> I get an error <type 'exceptions.AttributeError'> 'DAL' object has no
>> attribute 'office'
>>
>> What am I missing?
>>
>> Thanks in advance!
>>
>
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.