class documentation

class InlineModelAdmin(BaseModelAdmin):

Known subclasses: django.contrib.admin.StackedInline, django.contrib.admin.TabularInline, django.contrib.contenttypes.admin.GenericInlineModelAdmin

View In Hierarchy

Options for inline editing of model instances.

Provide fk_name to specify the attribute name of the ForeignKey from model to its parent. This is required if model has more than one ForeignKey to its parent.

Method __init__ Undocumented
Method ​_get​_form​_for​_get​_fields Undocumented
Method ​_has​_any​_perms​_for​_target​_model No summary
Method get​_extra Hook for customizing the number of extra inline forms.
Method get​_formset Return a BaseInlineFormSet class for use in admin add/change views.
Method get​_max​_num Hook for customizing the max number of extra inline forms.
Method get​_min​_num Hook for customizing the min number of inline forms.
Method get​_queryset Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.
Method has​_add​_permission Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
Method has​_change​_permission Return True if the given request has permission to change the given Django model instance, the default implementation doesn't examine the obj parameter.
Method has​_delete​_permission Return True if the given request has permission to change the given Django model instance, the default implementation doesn't examine the obj parameter.
Method has​_view​_permission Return True if the given request has permission to view the given Django model instance. The default implementation doesn't examine the obj parameter.
Class Variable can​_delete Undocumented
Class Variable classes Undocumented
Class Variable extra Undocumented
Class Variable fk​_name Undocumented
Class Variable max​_num Undocumented
Class Variable min​_num Undocumented
Class Variable model Undocumented
Class Variable show​_change​_link Undocumented
Class Variable template Undocumented
Instance Variable admin​_site Undocumented
Instance Variable has​_registered​_model Undocumented
Instance Variable opts Undocumented
Instance Variable parent​_model Undocumented
Instance Variable verbose​_name Undocumented
Instance Variable verbose​_name​_plural Undocumented
Property media Undocumented

Inherited from BaseModelAdmin:

Method check Undocumented
Method formfield​_for​_choice​_field Get a form Field for a database Field that has declared choices.
Method formfield​_for​_dbfield Hook for specifying the form Field instance for a given database Field instance.
Method formfield​_for​_foreignkey Get a form Field for a ForeignKey.
Method formfield​_for​_manytomany Get a form Field for a ManyToManyField.
Method get​_autocomplete​_fields Return a list of ForeignKey and/or ManyToMany fields which should use an autocomplete widget.
Method get​_empty​_value​_display Return the empty_value_display set on ModelAdmin or AdminSite.
Method get​_exclude Hook for specifying exclude.
Method get​_field​_queryset If the ModelAdmin specifies ordering, the queryset should respect that ordering. Otherwise don't specify the queryset, let the field decide (return None in that case).
Method get​_fields Hook for specifying fields.
Method get​_fieldsets Hook for specifying fieldsets.
Method get​_inlines Hook for specifying custom inlines.
Method get​_ordering Hook for specifying field ordering.
Method get​_prepopulated​_fields Hook for specifying custom prepopulated fields.
Method get​_readonly​_fields Hook for specifying custom readonly fields.
Method get​_sortable​_by Hook for specifying which fields can be sorted in the changelist.
Method get​_view​_on​_site​_url Undocumented
Method has​_module​_permission Return True if the given request has any permission in the given app label.
Method has​_view​_or​_change​_permission Undocumented
Method lookup​_allowed Undocumented
Method to​_field​_allowed Return True if the model associated with this admin should be allowed to be referenced by the specified field.
Class Variable autocomplete​_fields Undocumented
Class Variable exclude Undocumented
Class Variable fields Undocumented
Class Variable fieldsets Undocumented
Class Variable filter​_horizontal Undocumented
Class Variable filter​_vertical Undocumented
Class Variable ordering Undocumented
Class Variable prepopulated​_fields Undocumented
Class Variable radio​_fields Undocumented
Class Variable raw​_id​_fields Undocumented
Class Variable readonly​_fields Undocumented
Class Variable show​_full​_result​_count Undocumented
Class Variable sortable​_by Undocumented
Class Variable view​_on​_site Undocumented
Instance Variable formfield​_overrides Undocumented
def __init__(self, parent_model, admin_site):
def _get_form_for_get_fields(self, request, obj=None):

Undocumented

def _has_any_perms_for_target_model(self, request, perms):
This method is called only when the ModelAdmin's model is for an ManyToManyField's implicit through model (if self.opts.auto_created). Return True if the user has any of the given permissions ('add', 'change', etc.) for the model that points to the through model.
def get_extra(self, request, obj=None, **kwargs):
Hook for customizing the number of extra inline forms.
def get_formset(self, request, obj=None, **kwargs):
Return a BaseInlineFormSet class for use in admin add/change views.
def get_max_num(self, request, obj=None, **kwargs):
Hook for customizing the max number of extra inline forms.
def get_min_num(self, request, obj=None, **kwargs):
Hook for customizing the min number of inline forms.
def get_queryset(self, request):
Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.
def has_add_permission(self, request, obj):
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
def has_change_permission(self, request, obj=None):

Return True if the given request has permission to change the given Django model instance, the default implementation doesn't examine the obj parameter.

Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to change the obj model instance. If obj is None, this should return True if the given request has permission to change any object of the given type.

def has_delete_permission(self, request, obj=None):

Return True if the given request has permission to change the given Django model instance, the default implementation doesn't examine the obj parameter.

Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.

def has_view_permission(self, request, obj=None):

Return True if the given request has permission to view the given Django model instance. The default implementation doesn't examine the obj parameter.

If overridden by the user in subclasses, it should return True if the given request has permission to view the obj model instance. If obj is None, it should return True if the request has permission to view any object of the given type.

can_delete: bool =

Undocumented

classes =

Undocumented

extra: int =

Undocumented

fk_name =

Undocumented

max_num =

Undocumented

min_num =

Undocumented

model =

Undocumented

show_change_link: bool =

Undocumented

admin_site =

Undocumented

has_registered_model =

Undocumented

opts =

Undocumented

parent_model =

Undocumented

verbose_name =

Undocumented

verbose_name_plural =

Undocumented

@property
media =

Undocumented