I want to make an added username field of a custom auth_user table
writeable with registration.
This is how the custom non writeable field is defined:
db.Field('username', length=32, label="User Name",
writable=False,),
The require attribute is added externally:
table.username.requires = [IS_LENGTH(minsize=3,
error_message="Three or more characters required"), IS_NOT_IN_DB(db,
table.username)]
This is how I alter the alter writeable attribute for registration
def user():
if request.args and request.args[0]=='register':
auth.settings.table_user.username.writeable=True
return dict(form=auth())
The field does not change to a writeable one in the registration
action.
I don't know what else I need to do to make the field writeable.
John Heenan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---