admin.ModelAdmin.actions

ModelAdmin.actions A list of actions to make available on the change list page. See Admin actions for details.

admin.InlineModelAdmin.verbose_name_plural

InlineModelAdmin.verbose_name_plural An override to the verbose_name_plural found in the model’s inner Meta class.

admin.InlineModelAdmin.raw_id_fields

InlineModelAdmin.raw_id_fields By default, Django’s admin uses a select-box interface (<select>) for fields that are ForeignKey. Sometimes you don’t want to incur the overhead of having to select all the related instances to display in the drop-down. raw_id_fields is a list of fields you would like to change into an Input widget for either a ForeignKey or ManyToManyField: class BookInline(admin.TabularInline): model = Book raw_id_fields = ("pages",)

admin.InlineModelAdmin.show_change_link

InlineModelAdmin.show_change_link Specifies whether or not inline objects that can be changed in the admin have a link to the change form. Defaults to False.

admin.InlineModelAdmin.template

InlineModelAdmin.template The template used to render the inline on the page.

admin.InlineModelAdmin.model

InlineModelAdmin.model The model which the inline is using. This is required.

admin.InlineModelAdmin.min_num

InlineModelAdmin.min_num This controls the minimum number of forms to show in the inline. See modelformset_factory() for more information. InlineModelAdmin.get_min_num() also allows you to customize the minimum number of displayed forms.

admin.InlineModelAdmin.get_min_num()

InlineModelAdmin.get_min_num(request, obj=None, **kwargs) Returns the minimum number of inline forms to use. By default, returns the InlineModelAdmin.min_num attribute. Override this method to programmatically determine the minimum number of inline forms. For example, this may be based on the model instance (passed as the keyword argument obj).

admin.InlineModelAdmin.max_num

InlineModelAdmin.max_num This controls the maximum number of forms to show in the inline. This doesn’t directly correlate to the number of objects, but can if the value is small enough. See Limiting the number of editable objects for more information. InlineModelAdmin.get_max_num() also allows you to customize the maximum number of extra forms.

admin.InlineModelAdmin.get_max_num()

InlineModelAdmin.get_max_num(request, obj=None, **kwargs) Returns the maximum number of extra inline forms to use. By default, returns the InlineModelAdmin.max_num attribute. Override this method to programmatically determine the maximum number of inline forms. For example, this may be based on the model instance (passed as the keyword argument obj): class BinaryTreeAdmin(admin.TabularInline): model = BinaryTree def get_max_num(self, request, obj=None, **kwargs): max_num = 1