Hi all,
sorry for repeating my question but I haven't gotten
a solution on first attempt and this really nags me.
This is my model:
class Person(models.Model):
GENDER_CHOICES = (
( 'm', 'Male' ),
( 'f', 'Female' ),
)
gender = models.CharField( blank=False, null=False, "gender", maxlength=1,
choices=GENDER_CHOICES, default='m' )
Using form_for_model() on the above model results in HTML like this:
-
Male
Female
How do I get rid of the first option (the dashes)?
Creating my form with initial={ 'gender':'m' } at least sets the default option
correctly (default='m' on the model is happily ignored btw, why?) but the dashes
are still there.
It obviously doesn't make sense to offer an option to the user
that they aren't allowed to select, so can anyone confirm that
this is a bug or is my code just acting wierd?
-mark
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---