mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.
This commit is contained in:
parent
0ec4dc91e0
commit
8838d4dd49
41 changed files with 147 additions and 243 deletions
|
@ -557,8 +557,8 @@ You can pass this parameter when instantiating the formset::
|
|||
>>> from myapp.forms import ArticleForm
|
||||
|
||||
>>> class MyArticleForm(ArticleForm):
|
||||
... def __init__(self, *args, **kwargs):
|
||||
... self.user = kwargs.pop('user')
|
||||
... def __init__(self, *args, user, **kwargs):
|
||||
... self.user = user
|
||||
... super().__init__(*args, **kwargs)
|
||||
|
||||
>>> ArticleFormSet = formset_factory(MyArticleForm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue