Reputation: 11
in models
choice = models.BooleanField()
in forms I use
choices = (
('1', 'Buy'),
('0', 'Sell'),
)
choice = forms.TypedChoiceField(label=u'Тип предожения', choices=choices, widget=forms.RadioSelect,)
but when i edit item, value is not selected... How can I make to previous selected value be marked
Upvotes: 1
Views: 600
Reputation: 600059
You've used strings for your choices keys. Booleans are True
and False
.
Upvotes: 1