Good point. I will discuss this on web2py-developers. We may need to revert
this patch or find a different solution to the problem.
On Monday, 23 July 2012 23:43:07 UTC-5, David J wrote:
>
> Ok.
>
> I am not going to complain about it because I fixed the app,
>
> However, I did see it in the docs. if you search the docs for
> auth.signature it shows the usage.
>
> But here is where it broke..I had a custom auth table, and in that table I
> called
>
> db.define_table(
> auth.settings.table_user_name,
> Field('first_name', length=64, default='',widget = lambda f, v:
> SQLFORM.widgets.string.widget(f, v, _class='span6')),
>
> ...,
> auth.signature)
>
> custom_auth_table = db[auth.settings.table_user_name] # get the
> custom_auth_table
> custom_auth_table.first_name.requires = \
> IS_NOT_EMPTY(error_message=auth.messages.is_empty)
> custom_auth_table.last_name.requires = \
> IS_NOT_EMPTY(error_message=auth.messages.is_empty)
> custom_auth_table.password.requires = [CRYPT(key=auth.settings.hmac_key)]
> custom_auth_table.email.requires = [
> IS_EMAIL(error_message=auth.messages.invalid_email),
> IS_NOT_IN_DB(db, custom_auth_table.email)]
>
>
> db.auth_user.is_active.writable = db.auth_user.is_active.readable=False
>
> db.define_tables()
>
>
> Anyway; like I said, I am fine either way, if other users complain about
> it, then I may change my opinion.
>
> I just thought I would bring it up as I am sure you like feedback
> regarding these types of changes.
>
> Thanks.
> David
>
>
>
> On 7/23/12 11:53 PM, Massimo Di Pierro wrote:
>
> Yes. auth.signature used to be defined when Auth() is instantiated. Now it
> is defined when auth.define_tables() is called. There is disagreement on
> whether this is a breaking of backward compatibility since this is
> not exactly documented. There are reason for the switch. Is this a big
> deal? It is not clear whether this change of behavior should propagate to
> stable.
>
> On Monday, 23 July 2012 16:38:18 UTC-5, David J wrote:
>>
>> I just upgraded my web2py to latest trunk.
>>
>> I get an exception
>>
>> S'("\'Auth\' object has no attribute \'signature\'",)'
>>
>> did something change. I tried the mailing list archive to see, but maybe
>> I missed something.
>>
>> Thanks.
>>
>>
>> --
>
>
>
>
>
>
--