Pass a tuple with the choices to your model

blah_choices = (('One', '1'),('two','2'))

blahs = models.CharField(_(u'blah'), blank=True, null=True,
max_length=64, choices=blah_choice, default='blah')

J
On Dec 8, 5:16 pm, Niall Kelly <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Does anybody know how to set initial values for MultipleChoiceFields
> (akin to how in the admin interface ManyTo* relationships have a select
> box)? I've tried setting it's it to a list of values or individual value
> but no luck. This is part of a formset so the initial values are
> dictionaries.
>
> Thanks,
> Niall
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Python Ireland" 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.ie/group/pythonireland?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to