[web2py] table field with reference to other in read-only mode doesn't appear right
I wonder if somebody could help me. Here is my Field: Field( 'updated_by', db.auth_user, writable = False ) CRUD rendered it in form None but the record has a value 1 and I have user in auth_user.id=1 If I modify the Field to: Field( 'updated_by', db.auth_user, writable = False , requires = IS_EMPTY_OR( IS_IN_DB( db, db.auth_user.id, '% (first_name)s' ) ) ) The result is 1 and not the first_name value. If I modify the Field to: Field( 'updated_by', db.auth_user) The result is a list with all the auth_user rows :-o With the Field like this: Field( 'updated_by', db.auth_user, requires = IS_EMPTY_OR( IS_IN_DB( db, db.auth_user.id, '% (first_name)s' ) ) ) There is a result list with all the first_name values... Version 1.91.6 (2011-01-03 17:55:14)
[web2py] table field with reference to other in read-only mode doesn't appear right
I wonder if somebody could help me. Here is my Field: Field( 'updated_by', db.auth_user, writable = False ) CRUD rendered it in form None but the record has a value 1 and I have user in auth_user.id=1 If I modify the Field to: Field( 'updated_by', db.auth_user, writable = False , requires = IS_EMPTY_OR( IS_IN_DB( db, db.auth_user.id, '% (first_name)s' ) ) ) The result is 1 and not the first_name value. If I modify the Field to: Field( 'updated_by', db.auth_user) The result is a list with all the auth_user rows :-o With the Field like this: Field( 'updated_by', db.auth_user, requires = IS_EMPTY_OR( IS_IN_DB( db, db.auth_user.id, '% (first_name)s' ) ) ) There is a result list with all the first_name values... Version 1.91.6 (2011-01-03 17:55:14)