you can use a list:string field which will store values in a Python list.
then if user type "I am alergic to : peanut" and "I like to eat : banana"
you have a list with
["I am alergic to : peanut", "I like to eat : banana"]
Internally dal stores a pipe | separated string in db.
records = db(query).select()
for row in records:
for item in row.custom:
print 'user defined %s with value %s' % item.split(':')
note you will need to create a custom valudator to ensure that each value in
custom field is separated with :
this is the easiest way. may be not the best.
http://zerp.ly/rochacbruno
Em 24/10/2011 06:47, "seongjoo" <[email protected]> escreveu:
> Hello,
>
> I have an application that has adding user-defined field functionality.
> There is a basic set of information fields user might need to fill in to
> submit the data. User can also define his/her own information field. For
> example, user can type in user-defined field name and its value: 'I
> am allergic to": "peanut, cat".
>
> When an application needs to store arbitrary user defined data, I
> understand that NoSQL might be needed instead of RDBMS. But I just want to
> survey if there is a good way to do this without moving too far away from
> web2py DAL.Thank you.
>