diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-08-07 14:56:38 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-08-07 14:56:38 +0000 |
| commit | 50e3aa03e66fb7b7b7c6f5533efd961742b81853 (patch) | |
| tree | 91f6df9dc649c4211336514951cf040b2ce61f20 /docs | |
| parent | 6ac4aba918fde4d0de8cb371d4ae72cd09fa7151 (diff) | |
Fixed #11735 -- Corrected an example of FormSet subclassing. Thanks to claudep for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/forms/modelforms.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index fd3edf5104..02cce34fbc 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -595,8 +595,8 @@ Alternatively, you can create a subclass that sets ``self.queryset`` in class BaseAuthorFormSet(BaseModelFormSet): def __init__(self, *args, **kwargs): - self.queryset = Author.objects.filter(name__startswith='O') super(BaseAuthorFormSet, self).__init__(*args, **kwargs) + self.queryset = Author.objects.filter(name__startswith='O') Then, pass your ``BaseAuthorFormSet`` class to the factory function:: |
