diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/modelforms.txt | 1 | ||||
| -rw-r--r-- | docs/newforms.txt | 5 | ||||
| -rw-r--r-- | docs/tutorial04.txt | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/docs/modelforms.txt b/docs/modelforms.txt index 554aeb7ea0..a76d797527 100644 --- a/docs/modelforms.txt +++ b/docs/modelforms.txt @@ -121,6 +121,7 @@ A full example Consider this set of models:: from django.db import models + from django.newforms import ModelForm TITLE_CHOICES = ( ('MR', 'Mr.'), diff --git a/docs/newforms.txt b/docs/newforms.txt index d07f7f9dc3..25d80fda54 100644 --- a/docs/newforms.txt +++ b/docs/newforms.txt @@ -1555,8 +1555,9 @@ representing a foreign key. The ``__unicode__`` method of the model will be called to generate string representations of the objects for use in the field's choices; to provide customized representations, subclass ``ModelChoiceField`` -and override ``label_for_model``. This method will receive model -object, and should return a string suitable for representing it:: +and override ``label_from_instance``. This method will receive a model +object, and should return a string suitable for representing it. For +example:: class MyModelChoiceField(ModelChoiceField): def label_from_instance(self, obj): diff --git a/docs/tutorial04.txt b/docs/tutorial04.txt index 8f23fdd9e6..78f954d632 100644 --- a/docs/tutorial04.txt +++ b/docs/tutorial04.txt @@ -266,7 +266,7 @@ from ``polls/views.py``. We don't need them anymore -- they have been replaced by generic views. The ``vote()`` view is still required. However, it must be modified to match -the new context variables. In the ``render_to_repsonse()`` call, rename the +the new context variables. In the ``render_to_response()`` call, rename the ``poll`` context variable to ``object``. The last thing to do is fix the URL handling to account for the use of generic |
