| 1552 | | Allows the selection of a single model object, suitable for representing a |
|---|
| 1553 | | foreign key. The method receives an object as an argument and must return a |
|---|
| 1554 | | string to represent it. |
|---|
| 1555 | | |
|---|
| 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_for_model``:: |
|---|
| | 1552 | Allows the selection of a single model object, suitable for |
|---|
| | 1553 | representing a foreign key. |
|---|
| | 1554 | |
|---|
| | 1555 | The labels for the choice field call the ``__unicode__`` method of the |
|---|
| | 1556 | model to generate string representations to use in the field's |
|---|
| | 1557 | choices; to provide customized representations,, subclass |
|---|
| | 1558 | ``ModelChoiceField`` and override ``label_for_model``; this method |
|---|
| | 1559 | will receive an object, and should return a string suitable for |
|---|
| | 1560 | representing it:: |
|---|