staff-gmail wrote: > I'm using vers .96 > I converted a char field to have choices > > old: prefix = models.CharField(maxlength=100, default = 'Mr.') > > I then changed my model: > SALUTATION=( > ('Mr.','Mr.'), > ('Ms.','Ms.'), > ) > ... > prefix = models.CharField(maxlength=100, choices=SALUTATION, default='Mr.') > > I then ran manage.py syncdb - result was okay. > > now when I run a form_for_instance it correctly puts in all the field > information but the NewForm prefix field shows simply as a input field > not as a select box. > > Should this work ? Am I doing something wrong or is this a bug ? Or > should I be running SVN ? > > I'm pretty sure this is a known limitation of 0.96 that's fixed in trunk. I don't have a bug # to hand, though.
You can work around it in 0.96 by explicitly setting the widget : Myform.base_fields['prefix'].widget = widgets.Select(choices=SALUTATION) Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---