diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index f7aefa4..ef89b2e 100644
|
a
|
b
|
The difference between these two is merely the template used to render them.
|
| 1027 | 1027 | The ``InlineModelAdmin`` class is a subclass of ``ModelAdmin`` so it inherits |
| 1028 | 1028 | all the same functionality as well as some of its own: |
| 1029 | 1029 | |
| 1030 | | ``model`` |
| 1031 | | ~~~~~~~~~ |
| | 1030 | .. attribute:: InlineModelAdmin.model |
| 1032 | 1031 | |
| 1033 | | The model in which the inline is using. This is required. |
| | 1032 | The model in which the inline is using. This is required. |
| 1034 | 1033 | |
| 1035 | | ``fk_name`` |
| 1036 | | ~~~~~~~~~~~ |
| | 1034 | .. attribute:: InlineModelAdmin.fk_name |
| 1037 | 1035 | |
| 1038 | | The name of the foreign key on the model. In most cases this will be dealt |
| 1039 | | with automatically, but ``fk_name`` must be specified explicitly if there are |
| 1040 | | more than one foreign key to the same parent model. |
| | 1036 | The name of the foreign key on the model. In most cases this will be dealt |
| | 1037 | with automatically, but ``fk_name`` must be specified explicitly if there |
| | 1038 | are more than one foreign key to the same parent model. |
| 1041 | 1039 | |
| 1042 | | ``formset`` |
| 1043 | | ~~~~~~~~~~~ |
| | 1040 | .. attribute:: InlineModelAdmin.formset |
| 1044 | 1041 | |
| 1045 | | This defaults to ``BaseInlineFormSet``. Using your own formset can give you |
| 1046 | | many possibilities of customization. Inlines are built around |
| 1047 | | :ref:`model formsets <model-formsets>`. |
| | 1042 | This defaults to ``BaseInlineFormSet``. Using your own formset can give you |
| | 1043 | many possibilities of customization. Inlines are built around |
| | 1044 | :ref:`model formsets <model-formsets>`. |
| 1048 | 1045 | |
| 1049 | | ``form`` |
| 1050 | | ~~~~~~~~ |
| | 1046 | .. attribute:: InlineModelAdmin.form |
| 1051 | 1047 | |
| 1052 | | The value for ``form`` defaults to ``ModelForm``. This is what is |
| 1053 | | passed through to ``inlineformset_factory`` when creating the formset for this |
| 1054 | | inline. |
| | 1048 | The value for ``form`` defaults to ``ModelForm``. This is what is passed |
| | 1049 | through to ``inlineformset_factory`` when creating the formset for this |
| | 1050 | inline. |
| 1055 | 1051 | |
| 1056 | 1052 | .. _ref-contrib-admin-inline-extra: |
| 1057 | 1053 | |
| 1058 | | ``extra`` |
| 1059 | | ~~~~~~~~~ |
| | 1054 | .. attribute:: InlineModelAdmin.extra |
| 1060 | 1055 | |
| 1061 | | This controls the number of extra forms the formset will display in addition |
| 1062 | | to the initial forms. See the |
| 1063 | | :ref:`formsets documentation <topics-forms-formsets>` for more information. |
| 1064 | 1056 | |
| 1065 | | .. versionadded:: 1.2 |
| | 1057 | This controls the number of extra forms the formset will display in addition |
| | 1058 | to the initial forms. See the |
| | 1059 | :ref:`formsets documentation <topics-forms-formsets>` for more information. |
| | 1060 | |
| | 1061 | .. versionadded:: 1.2 |
| 1066 | 1062 | |
| 1067 | | For users with JavaScript-enabled browsers, an "Add another" link is |
| 1068 | | provided to enable any number of additional inlines to be added in |
| 1069 | | addition to those provided as a result of the ``extra`` argument. |
| | 1063 | For users with JavaScript-enabled browsers, an "Add another" link is |
| | 1064 | provided to enable any number of additional inlines to be added in addition |
| | 1065 | to those provided as a result of the ``extra`` argument. |
| 1070 | 1066 | |
| 1071 | | The dynamic link will not appear if the number of currently displayed |
| 1072 | | forms exceeds ``max_num``, or if the user does not have JavaScript |
| 1073 | | enabled. |
| | 1067 | The dynamic link will not appear if the number of currently displayed forms |
| | 1068 | exceeds ``max_num``, or if the user does not have JavaScript enabled. |
| 1074 | 1069 | |
| 1075 | 1070 | .. _ref-contrib-admin-inline-max-num: |
| 1076 | 1071 | |
| 1077 | | ``max_num`` |
| 1078 | | ~~~~~~~~~~~ |
| | 1072 | .. attribute:: InlineModelAdmin.max_num |
| 1079 | 1073 | |
| 1080 | | This controls the maximum number of forms to show in the inline. This doesn't |
| 1081 | | directly correlate to the number of objects, but can if the value is small |
| 1082 | | enough. See :ref:`model-formsets-max-num` for more information. |
| | 1074 | This controls the maximum number of forms to show in the inline. This |
| | 1075 | doesn't directly correlate to the number of objects, but can if the value |
| | 1076 | is small enough. See :ref:`model-formsets-max-num` for more information. |
| 1083 | 1077 | |
| 1084 | | ``raw_id_fields`` |
| 1085 | | ~~~~~~~~~~~~~~~~~ |
| | 1078 | .. attribute:: InlineModelAdmin.raw_id_fields |
| 1086 | 1079 | |
| 1087 | | By default, Django's admin uses a select-box interface (<select>) for |
| 1088 | | fields that are ``ForeignKey``. Sometimes you don't want to incur the |
| 1089 | | overhead of having to select all the related instances to display in the |
| 1090 | | drop-down. |
| | 1080 | By default, Django's admin uses a select-box interface (<select>) for |
| | 1081 | fields that are ``ForeignKey``. Sometimes you don't want to incur the |
| | 1082 | overhead of having to select all the related instances to display in the |
| | 1083 | drop-down. |
| 1091 | 1084 | |
| 1092 | | ``raw_id_fields`` is a list of fields you would like to change |
| 1093 | | into a ``Input`` widget for either a ``ForeignKey`` or ``ManyToManyField``:: |
| | 1085 | ``raw_id_fields`` is a list of fields you would like to change into a |
| | 1086 | ``Input`` widget for either a ``ForeignKey`` or ``ManyToManyField``:: |
| 1094 | 1087 | |
| 1095 | | class BookInline(admin.TabularInline): |
| 1096 | | model = Book |
| 1097 | | raw_id_fields = ("pages",) |
| | 1088 | class BookInline(admin.TabularInline): |
| | 1089 | model = Book |
| | 1090 | raw_id_fields = ("pages",) |
| 1098 | 1091 | |
| 1099 | | ``template`` |
| 1100 | | ~~~~~~~~~~~~ |
| 1101 | 1092 | |
| 1102 | | The template used to render the inline on the page. |
| | 1093 | .. attribute:: InlineModelAdmin.template |
| 1103 | 1094 | |
| 1104 | | ``verbose_name`` |
| 1105 | | ~~~~~~~~~~~~~~~~ |
| | 1095 | The template used to render the inline on the page. |
| 1106 | 1096 | |
| 1107 | | An override to the ``verbose_name`` found in the model's inner ``Meta`` class. |
| | 1097 | .. attribute:: InlineModelAdmin.verbose_name |
| 1108 | 1098 | |
| 1109 | | ``verbose_name_plural`` |
| 1110 | | ~~~~~~~~~~~~~~~~~~~~~~~ |
| | 1099 | An override to the ``verbose_name`` found in the model's inner ``Meta`` |
| | 1100 | class. |
| | 1101 | |
| | 1102 | .. attribute:: InlineModelAdmin.verbose_name_plural |
| | 1103 | |
| | 1104 | An override to the ``verbose_name_plural`` found in the model's inner |
| | 1105 | ``Meta`` class. |
| | 1106 | |
| | 1107 | .. attribute:: InlineModelAdmin.can_delete |
| | 1108 | |
| | 1109 | Specifies whether or not inline objects can be deleted in the inline. |
| | 1110 | Defaults to ``True``. |
| 1111 | 1111 | |
| 1112 | | An override to the ``verbose_name_plural`` found in the model's inner ``Meta`` |
| 1113 | | class. |
| 1114 | 1112 | |
| 1115 | 1113 | Working with a model with two or more foreign keys to the same parent model |
| 1116 | 1114 | --------------------------------------------------------------------------- |