db.define_table(
    'test',
    SQLField('unique', 'string', unique = True,
        requires = IS_NOT_IN_DB(db, 'test.unique')),
    )


def pseudo():
   db.table.field.writable = False
   db.table.field = 'some invalid value for the requires[]'
   form = crud.create(db.table)

the form doesn't run the validators for the non-writable field, and
when you are on GAE the uniqueness is not enforced on db level (and
DAL does not make up for this).

When I have the following:
def pseudo():
   db.table.field = 'some invalid value for the requires[]'
   form = crud.create(db.table)
   form.custom.widget.jaar.update(**dict(_disabled = True))

the value is non-editable by the user, it is validated but the value is removed

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to