my fault here. I typed too fast

auth.settings.user_table = db.define_table(
        auth.settings.auth_user_table,

should be

auth.settings.table_user = db.define_table(
        auth.settings.table_user_name,

Massimo

On Jul 5, 4:41 pm, weheh <[email protected]> wrote:
> Thanks, Massimo. I made up those 3 lines in an attempt to get things
> to work. Obviously, I didn't know what I was doing :(
>
> So I made your changes as per this:
>
> ----------------------------
> # CUSTOM USER
> # instantiate auth
> auth=Auth(globals(),db)
> # define custom user table
> auth.settings.user_table = db.define_table(
>         auth.settings.auth_user_table,
>         db.Field('first_name', length=128, default=''),
>         db.Field('last_name', length=128, default=''),
>         db.Field('email', length=128, default='',
>                 requires = [
>                         IS_EMAIL(),
>                         IS_NOT_IN_DB(db,'%s.email'%auth.settings.auth_user)
>                         ]
>                 ),
>         db.Field('password', 'password', readable=False,
>                 label='Password', requires=CRYPT()),
>         db.Field('registration_key', length=128,
> 104>         writable=False, readable=False, default=''),
>         )
>
> # define any other requires tableauth.define_tables()
> auth.settings.captcha=Recaptcha
> (request,public_key='RECAPTCHA_PUBLIC_KEY',private_key='RECAPTCHA_PRIVATE_KEY')
> auth.settings.mailer=mail               # for user email verification
>
> auth.define_tables()                    # creates all needed tables
>
> crud=Crud(globals(),db)                 # for CRUD helpers using auth
> crud.settings.auth=auth                 # (optional) enforces authorization 
> on crud
> ----------------------------
> and got this error message:
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 176, in restricted
>   File "C:/web2py/applications/myapp/models/db.py", line 104, in
> <module>
>   File "gluon/sql.py", line 986, in define_table
>   File "gluon/sql.py", line 438, in cleanupType
> Error: expected string or buffer
>
> Where line 104 is indicated in the code above by "104>" at the
> beginning of the line.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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