Hi group, I have a form (from newforms) with choices # Assume these are key-value pairs AGE_CHOICES=( (1, '0-3'), (2, '3-6'), (3, '6-15'), )
class CustomForm(forms.Form): age = forms.ChoiceField(label='Age', choices=AGE_CHOICES) How can I get the value (not the key) of the age attribute after validation? if f.is_valid(): cd = f.cleaned_data cd['age'] # returns the "key", not the value Thanks, Frank --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---