Maybe something like:

from gluon.utils import web2py_uuid

db.define_table('mytable', Field('myid', default=web2py_uuid), ...)

That will create a unique 36-character uuid for each record inserted.

Anthony


On Saturday, April 14, 2012 4:12:45 PM UTC-4, sebastian wrote:
>
> Hi All,
>
> as I'm using some links with id=blablabla where the ID is the real ID as 
> generated by web2py, that make very easy to guess other records (see the 
> movie "Social Networks" how they got the pictures of students just changing 
> the ID from the URL....)... 
>
> just wondering if web2py  has already some magic that add an extra column 
> with an unique random number....
>
> thanks
>
> -- 
> Sebastian E. Ovide
>
>
>
>
>  

Reply via email to