If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!


  • 0
    abhishekguptaiitd  13 years ago
    In my db model I have the following code
    auth_user = db.define_table(
       'auth_user',
        db.Field('first_name', length=128,default=''),
        db.Field('last_name', length=128,default=''),
        db.Field('email', length=128,default=''),#,unique=True),
        db.Field('twitter_id', length=128,default=None),#,unique=True),
        db.Field('facebook_id', length=128,default=None),#,unique=True),
        db.Field('password', 'password', readable=False),
        db.Field('registration_key', length=128, writable=False,readable=False,default=''))
    
    auth_user.first_name.requires = IS_NOT_EMPTY()
    auth_user.last_name.requires = IS_NOT_EMPTY()
    auth_user.password.requires = [IS_LENGTH(minsize=6,
                                error_message="We're sorry.  Please " + \
                                "enter a password with at least six " + \
                                "characters."),
                               CRYPT()]
    auth_user.email.requires = [IS_EMAIL(error_message=T("Please enter a valid email address.")),
                         IS_NOT_IN_DB(db, 'auth_user.email',
                         error_message=T("We're sorry. " + \
                         "That email address already exists in our system. " + \
                         "Please login or choose another email address."))]
    auth_user.registration_key.default = ''
    
    auth.define_tables()
    
    Also, the table is there from appadmin view. But I am still getting the same error.

Commented on:

Authenticating with Facebook Connect, Twitter API, and/or Google accounts. Working on and off of Google App Engine (GAE)

Hosting graciously provided by:
Python Anywhere