Are you saying Field('uuid', default=web2py_uuid(), readable=False, 
writable=False) doesn't hide the field (it should)? Can you show more code?

Also, note that default=web2py_uuid() will only set the default value once 
per request, so if your code happens to insert multiple records in the same 
request, they will get the same uuid. If you want the default to be a 
function that gets called once for each insert, then just pass the function 
itself as the default, rather than calling the function:

default=web2py_uuid

or

default=lambda: web2py_uuid()

Anthony

On Sunday, October 30, 2011 11:18:03 AM UTC-4, clarix wrote:
>
> Hello, 
>
> I added an uuid field to my tables to allow to merge dababases: 
>
> Field('uuid',default=web2py_uuid(),writable = False), 
>
> The problem I find is that the uuid field now shows in the crud.create 
> forms. I tried to set the uuid readable property to 
> False but in doing so the crud.create form not only shows the uuid 
> field but it also allows editing the field. 
>
> I would appreciate any help on this. Many thanks! 
>
> Clara

Reply via email to