Hi all, 
I create a field with requires=IS_IN_SET where list of values is a 
dictionary:

db.define_table('courses',
  ...
  Field('category',requires=IS_IN_SET({1:'Arte',2:'Artigianato',3:'Cucina',4
:'sport',5:'informatica'},zero='Scegli la categoria'))
  ...)


In default.py *result* function return result of a query in *courses* 
variable used by* results.html*.
In view file *results.html* I retrieve it with:

{{for course in courses:}}
...
<div>{{=course.category}}</div>
...
{{pass}}

but so I can retrieve only key (1,2,3,4,...).
How can I retrieve values ('Arte','Artigianato',...)?

Thanks
Fabio

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to