On Friday, February 25, 2011 11:50:40 AM UTC-5, stargate wrote: > But how do you make it so that it will generate a Registration ID > automatically. When i create a new application with the db wizard and > connect to the sqllite database I don't have any of these problems. I > can create a new user with out giving a registration id > web2py doesn't generate the registration_id -- it is something received from Janrain when a user logs in via Janrain. If the login isn't happening via Janrain, then there won't be any registration_id. If you want to avoid that error, I think you have three options:
1. Enter your own unique registration_id for each user in appadmin (I think any unique string should work, including just repeating the username or email); 2. Add new users via the regular application registration form (i.e., /[your_app]/default/user/register) instead of via appadmin. The standard registration form doesn't show the registration_id field (because readable = writable = False), so I don't think it ends up getting validated, and therefore there is no validation error; or 3. Remove the following line: db.auth_user.registration_id.requires = IS_NOT_IN_DB(db, db.auth_user.registration_id) As far as I can tell, the registration_id error you're getting in appadmin should happen any time you use the wizard to create an app with auth, even using SQLite (I get the same error when I try it). Anyway, it should be easy enough to avoid via the above options. Anthony > > On Feb 25, 10:25 am, Anthony <[email protected]> wrote: > > On Friday, February 25, 2011 10:04:36 AM UTC-5, stargate wrote: > > > > > Thanks for all the help I hope i can solve this problem > > > > What problem do you still need to solve -- is it just the issue with the > > "Registration Id" error in appadmin? As far as I can tell, the > > "registration_id" field is used in conjunction with the Janrain login > > method. If you're not using Janrain, you can probably remove this line: > > > > db.auth_user.registration_id.requires = IS_NOT_IN_DB(db, > > db.auth_user.registration_id) > > > > That will allow you to leave "Registration Id" blank in appadmin. > Otherwise, > > it should work as long as you enter unique registration_id's for each new > > > record. It appears the registration_id is normally something provided by > > Janrain -- see /gluon/contrib/login_methods/rpx_account.py. > > > > Anthony >

