소스 검색

Adjusted BaseFormSet.get_form_kwargs example in docs.

Riccardo Magliocchetti 2 년 전
부모
커밋
df2db8b4a5
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      docs/topics/forms/formsets.txt

+ 3 - 0
docs/topics/forms/formsets.txt

@@ -748,6 +748,9 @@ argument - the index of the form in the formset. The index is ``None`` for the
     ...         kwargs['custom_kwarg'] = index
     ...         return kwargs
 
+    >>> ArticleFormSet = formset_factory(MyArticleForm, formset=BaseArticleFormSet)
+    >>> formset = ArticleFormSet()
+
 .. _formset-prefix:
 
 Customizing a formset's prefix