소스 검색

Fixed arguments for get_inline_instances example; refs #17856

Tim Graham 12 년 전
부모
커밋
300d052713
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      docs/ref/contrib/admin/index.txt

+ 1 - 1
docs/ref/contrib/admin/index.txt

@@ -1148,7 +1148,7 @@ templates used by the :class:`ModelAdmin` views:
             inlines = [MyInline, SomeOtherInline]
 
             def get_formsets(self, request, obj=None):
-                for inline in self.get_inline_instances():
+                for inline in self.get_inline_instances(request, obj):
                     # hide MyInline in the add view
                     if isinstance(inline, MyInline) and obj is None:
                         continue