From 50e3aa03e66fb7b7b7c6f5533efd961742b81853 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 7 Aug 2010 14:56:38 +0000 Subject: [PATCH] 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 --- docs/topics/forms/modelforms.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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::