Просмотр исходного кода

Fixed #11097 -- Added note about parent link fields in formsets for multi-table inheritance models.

Mac Chapman 5 лет назад
Родитель
Сommit
0b7378db1f
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      docs/topics/forms/modelforms.txt

+ 6 - 0
docs/topics/forms/modelforms.txt

@@ -788,6 +788,12 @@ with the ``Author`` model. It works just like a regular formset::
     means that a model formset is an extension of a basic formset that knows
     how to interact with a particular model.
 
+.. note::
+
+    When using :ref:`multi-table inheritance <multi-table-inheritance>`, forms
+    generated by a formset factory will contain a parent link field (by default
+    ``<parent_model_name>_ptr``) instead of an ``id`` field.
+
 Changing the queryset
 ---------------------