In Django models/forms the choices for a combobox often look like this:
food_choices = (("",""), ("1", "Falafel"), ("2", "Hummus"), ("3", "Eggplant Stuff, Babaganoush???"),
So the value to be stored in the database will be 1/2/3, but the displayed value on the form will be the long description. When we are working in code outside a form, how can we quickly lookup the long description given the short value stored in the model?
So I want to map short values to long values:
>>print foo("1") "Falafel"