Skip to content
Browse files

[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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 9e33599 commit d176d112b9b975b1fc2de7ad1484daef62f16b6c @freakboy3742 freakboy3742 committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 docs/topics/forms/modelforms.txt
2 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::

0 comments on commit d176d11

Please sign in to comment.
Something went wrong with that request. Please try again.