Re: [web2py] Dealing with arbitary user defined DAL fields

2011-10-27 Thread seongjoo
It seems that the problem is more of general python problem than of web2py. Before using string:list type field to store user-defined field, I didn't experience having dict key values as non-ascii. Because of the new problem definition, I did experience it and learned something new. For just cl

Re: [web2py] Dealing with arbitary user defined DAL fields

2011-10-27 Thread seongjoo
> > A slight twist of my version is to use {"key": "value"} instead of "key: > value". The thought was to convert the string into dictionary-like datatype > more easily. > Using {"key": "value"} format, the element of the field that has list:string type stores it as "{"key": "value"}". The pr

Re: [web2py] Dealing with arbitary user defined DAL fields

2011-10-24 Thread seongjoo
It's such a workable solution. Thank you! I came to a similar conclusion using list:string for user-defined fields. A slight twist of my version is to use {"key": "value"} instead of "key: value". The thought was to convert the string into dictionary-like datatype more easily.

Re: [web2py] Dealing with arbitary user defined DAL fields

2011-10-24 Thread Bruno Rocha
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(q

[web2py] Dealing with arbitary user defined DAL fields

2011-10-24 Thread seongjoo
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 a