Ticket #6843: newforms_label.patch
File newforms_label.patch, 648 bytes (added by , 17 years ago) |
---|
-
docs/newforms.txt
1554 1554 string to represent it. 1555 1555 1556 1556 The labels for the choice field call the ``__unicode__`` method of the model to 1557 generate string representations. To provide custom labels, subclass ``ModelChoiceField`` and override ``label_f or_model``::1557 generate string representations. To provide custom labels, subclass ``ModelChoiceField`` and override ``label_from_instance``:: 1558 1558 1559 1559 class MyModelChoiceField(ModelChoiceField): 1560 1560 def label_from_instance(self, obj):