Good catch for the IS_IN_DB() I wrote this part fast (address book part)
long time ago in a pet app and copy the code in production without too much
double check...

I am not sure I understand why you say that I record versioning the whole
tables as far as I understand this version only auth_user, no??

db.auth_user._enable_record_versioning(archive_db=db,

archive_name='auth_user_archive',

current_record='current_record',

is_active='is_active')

Or you talk about another part of the code?

Thanks


Richard

On Tue, Mar 14, 2017 at 3:42 PM, Richard Vézina <[email protected]
> wrote:

> Thanks for the look up... Too many questions at the same time, will review
> my code base on your pin point...
>
> :)
>
> Richard
>
> On Tue, Mar 14, 2017 at 3:28 PM, Leonel Câmara <[email protected]>
> wrote:
>
>> Ok I've found the problem.
>>
>> You have 2 IS_IN_DB validator calls where you use db.address.id and
>> db.phone_number_kind.id instead of "address.id" and "phone_number_kind.id
>> "
>>
>> But the bigger problem is that you are enabling record versioning for all
>> tables which pretty much makes them all load.
>>
>> Instead of this you can add an on_define to each table where you turn
>> record versioning on for that specific table.
>>
>> def toggle_versioning(table):
>>     table._enable_record_versioning()
>>
>> db.define_table('my_versioned_table',
>>     Field('name'),
>>     on_define=toggle_versioning
>> )
>>
>>
>>
>>
>> By the way why are you defining auth tables in your model and then
>> calling auth.define_tables to define them again, also consider using
>> auth.signature instead of tables_generic_fields.
>>
>> --
>> 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 [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to