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 usi
How do people usually do this? Obviously it's easiest just to use IDs and
prety easy to avoid any problems with guessing IDs.
But if you do want to obfuscate IDs I suppose you could either add the
column (not ideal since better to work with IDs) or do the encryption each
time you create and ret
Well, it's probably best to use access control on the server rather than
relying on someone not guessing an ID, but if you really need to enable
access solely via the URL, then you probably want a long ID (like a UUID).
Anthony
On Saturday, April 14, 2012 5:16:53 PM UTC-4, pbreit wrote:
>
> How
nothing stops you from making the UUID the ID field in the database. most
databases support such behavior.
GAE even provides a way to name a record though i don't think we have built
that in to web2py yet.but GAE's default ID generation is across the
entire database so i have never been ab
nice !, thanks
On Sat, Apr 14, 2012 at 9:41 PM, Anthony wrote:
> 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 Sa
I didn't know that it was possible... isn't the ID created by web2py ?
On Sun, Apr 15, 2012 at 12:28 AM, howesc wrote:
> nothing stops you from making the UUID the ID field in the database. most
> databases support such behavior.
>
> GAE even provides a way to name a record though i don't thi
6 matches
Mail list logo