Hi Kacper,
Using the same Django example:

    values = ( 'FR','SO','JR','SR','GR')
    labels = ('Freshman', 'Sophomore','Junior', 'Senior', 'Graduate')

    db.mytable.myfield.requires=IS_IN_SET(values, labels)

(if no labels, values are used as labels)

Massimo

On Oct 19, 7:09 am, Kacper Krupa <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a problem - i was searching a while and didn't find any good
> advice. I want to create a choice form in model, but the options are
> from list. Something like model relations but not to other table --
> just to a python list! (Something like choices parametr in Django 
> ->http://docs.djangoproject.com/en/dev/topics/db/models/#field-options).
>
> Thanks,
> Kacper.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to