In Gae, we can specify the choices when creating the stringproperty.
* phone_type = db.StringProperty(
choices=('home', 'work', 'fax', 'mobile', 'other'))
*
This will prevent other value's to this field. I am finding it very much
useful for my current design.
But how do i represent this in web2py's model. Is there any helper available
for same.
I am perfectly ok with using gae api (portability is not an issue). But I am
bit struck up finding the right place to define this(model/controller). Also
how do i use it with SQLFORM?. How well does it play with rest of web2py
code.
I also came across the following thread,
http://groups.google.com/group/web2py/browse_thread/thread/13f3fb91f90ef3b0?hl=en&tvc=2&q=gae+model
where creating new types like 'list_of_intgers', 'list_of_floats',
'list_of_stings' are discussed. But couldnt find further information on Gae
specific datatypes (particularly
ListProperty<http://code.google.com/appengine/docs/datastore/typesandpropertyclasses.html#ListProperty>
)
Anybody using these gae data types in web2py. Can somebody share some
thoughts on this?
Sorry if i am missing something obvious here.
Sudhakar.M
A mind once stretched by a new idea never regains its original dimension. -
Oliver Wendell Holmes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---