diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-08-07 15:01:17 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-08-07 15:01:17 +0000 |
| commit | d176d112b9b975b1fc2de7ad1484daef62f16b6c (patch) | |
| tree | 53a86121a7df2f730fd31eb7159947b807124e1b /docs | |
| parent | 9e33599bc3e2815f3d15c19a0d42f18731f49a2d (diff) | |
[1.2.X] Fixed #11735 -- Corrected an example of FormSet subclassing. Thanks to claudep for the report.
Backport of r13553 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13560 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:: |
