class BaseModelAdmin: (source)
Known subclasses: django.contrib.admin.ModelAdmin
, django.contrib.admin.options.InlineModelAdmin
Functionality common to both ModelAdmin and InlineAdmin.
Method | __init__ |
Undocumented |
Method | check |
Undocumented |
Method | formfield |
Get a form Field for a database Field that has declared choices. |
Method | formfield |
Hook for specifying the form Field instance for a given database Field instance. |
Method | formfield |
Get a form Field for a ForeignKey. |
Method | formfield |
Get a form Field for a ManyToManyField. |
Method | get |
Return a list of ForeignKey and/or ManyToMany fields which should use an autocomplete widget. |
Method | get |
Return the empty_value_display set on ModelAdmin or AdminSite. |
Method | get |
Hook for specifying exclude. |
Method | get |
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 |
Hook for specifying fields. |
Method | get |
Hook for specifying fieldsets. |
Method | get |
Hook for specifying custom inlines. |
Method | get |
Hook for specifying field ordering. |
Method | get |
Hook for specifying custom prepopulated fields. |
Method | get |
Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view. |
Method | get |
Hook for specifying custom readonly fields. |
Method | get |
Hook for specifying which fields can be sorted in the changelist. |
Method | get |
Undocumented |
Method | has |
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses. |
Method | has |
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 |
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 |
Return True if the given request has any permission in the given app label. |
Method | has |
Undocumented |
Method | has |
Return True if the given request has permission to view the given Django model instance. The default implementation doesn't examine the `obj` parameter. |
Method | lookup |
Undocumented |
Method | to |
Return True if the model associated with this admin should be allowed to be referenced by the specified field. |
Class Variable | autocomplete |
Undocumented |
Class Variable | exclude |
Undocumented |
Class Variable | fields |
Undocumented |
Class Variable | fieldsets |
Undocumented |
Class Variable | filter |
Undocumented |
Class Variable | filter |
Undocumented |
Class Variable | ordering |
Undocumented |
Class Variable | prepopulated |
Undocumented |
Class Variable | radio |
Undocumented |
Class Variable | raw |
Undocumented |
Class Variable | readonly |
Undocumented |
Class Variable | show |
Undocumented |
Class Variable | sortable |
Undocumented |
Class Variable | view |
Undocumented |
Instance Variable | formfield |
Undocumented |
django.contrib.gis.admin.GeoModelAdmin
Hook for specifying the form Field instance for a given database Field instance. If kwargs are given, they're passed to the form Field's constructor.
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).
django.contrib.admin.options.InlineModelAdmin
Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.
django.contrib.admin.options.InlineModelAdmin
Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.
django.contrib.admin.options.InlineModelAdmin
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.
django.contrib.admin.options.InlineModelAdmin
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.
Return True if the given request has any permission in the given app label. Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to view the module on the admin index page and access the module's index page. Overriding it does not restrict access to the add, change or delete views. Use `ModelAdmin.has_(add|change|delete)_permission` for that.
django.contrib.admin.options.InlineModelAdmin
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.
Return True if the model associated with this admin should be allowed to be referenced by the specified field.