My link is http://www.web2py.com/book/default/chapter/08#Customizing-Auth(it
is the same!) I have tried twice with two different browsers.



2011/9/20 Anthony <abasta...@gmail.com>

> Here's what I see at
> http://web2py.com/book/default/chapter/08#Customizing-Auth (screenshot
> attached) -- not the same as what you have pasted below.
>
> What URL are you accessing?
>
> Anthony
>
> On Tuesday, September 20, 2011 11:27:36 AM UTC-4, mweissen wrote:
>>
>> Thank you - now it works.
>> But: maybe there are two versions of THE BOOK?
>>
>> Five minutes ago I have found the following code in the online version
>> (chapter "Customizing Auth"):
>>
>> # after
>> # auth = Auth(globals(),db)
>>
>> db.define_table(
>>    auth.settings.table_user_name,
>> Field('first_name', length=128, default=''),
>> Field('last_name', length=128, default=''),
>> Field('email', length=128, default='', unique=True),
>> Field('password', 'password', length=512,
>>    readable=False, label='Password'),
>> Field('registration_key', length=512,
>>    writable=False, readable=False, default=''),
>> Field('reset_password_key', length=512,
>>    writable=False, readable=False, default=''),
>> Field('registration_id', length=512,
>>    writable=False, readable=False, default=''))
>>
>> auth_table.first_name.requires = \
>>    IS_NOT_EMPTY(error_message=auth.messages.is_empty)
>> auth_table.last_name.requires = \
>>    IS_NOT_EMPTY(error_message=auth.messages.is_empty)
>> auth_table.password.requires = [IS_STRONG(), CRYPT()]
>> auth_table.email.requires = [
>>    IS_EMAIL(error_message=auth.messages.invalid_email),
>>    IS_NOT_IN_DB(db, auth_table.email)]
>> auth.settings.table_user = auth_table
>>
>> # before
>> # auth.define_tables()
>>
>> Where did you find "your" code?
>> Martin
>>
>

Reply via email to