I need customice a auth tables and send me a ticket when I do that

here is the code I wrote and the ticket send to my by web2py:

from gluon.tools import *
auth=Auth(globals(),db)                      # authentication/
authorization
auth.settings.hmac_key='sha512:582aedbf-4d01-4f41-81ad-ffb7eed2ada4'
auth.define_tables(
    auth.settings.table_user_name,
    Field('first_name', length=128),
    Field('last_name', length=128),
    Field('email', length=128, unique=True),
    Field('password', 'password', length=256, readable=False,
label='Password'),
    Field('registration_key', length=128, writable=False,
readable=False),
    Field('preferences', length=512))                         #
creates all needed tables

auth_table.first_name.requires=IS_NOT_EMPTY()
auth_table.last_name.requires=IS_NOT_EMPTY()
auth_table.password.requires=[CRYPT()]
auth_table.email.requires=[IS_EMAIL(), IS_NOT_IN_DB(db,
auth_table.email)]
auth_table.preferences.requires=IS_NOT_EMPTY()
auth.settings.table_user=auth_table
auth.define_tables()

crud=Crud(globals(),db)                      # for CRUD helpers using
auth
service=Service(globals())                   # for json, xml, jsonrpc,
xmlrpc, amfrpc



This is the ticket:



Error traceback


Traceback (most recent call last):
  File "/home/kike/prueba/web2py lin/gluon/restricted.py", line 173,
in restricted
    exec ccode in environment
  File "/home/kike/prueba/web2py lin/applications/prueba/models/
db.py", line 40, in <module>
    Field('preferences', length=512))                         #
creates all needed tables
TypeError: define_tables() takes at most 2 arguments (8 given)

please I need some help, thank for your help.......

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to