Admin¶
1 | from Digitalblend.iControl import admins
|
-
class
Digitalblend.iControl.admins.Admin(model, admin_site)¶ Encapsulate all admin options and functionality for a given model.
See also
-
static
register(model, admin)¶ Register the given model class with the given admin class.
If a model is already registered, raise AlreadyRegistered. If a model is abstract, raise ImproperlyConfigured.
- Parameters
1
admins.Admin.register(ExampleModel, ExampleAdmin)
-
static
unregister(model)¶ Unregisters the given model class form the admin site.
- Parameters
model (Model) – The model class to unregister from admin.
1
admins.Admin.unregister(ExampleModel)
-
property
inlines¶ Set inlines to encapsulate Stacked Inline Admin inside the admin object.
1
inlines = (Example1Inline, Example2Inline, )
Note
Optional.
-
property
list_display¶ Set list_display to control which fields are displayed on the change list page of the admin.
1
list_display = ('FieldName1', 'FieldName2', )
Note
Must be implemented.
-
property
list_filter¶ Set list_filter to activate filters in the right sidebar of the change list page of the admin.
1
list_filter = ('FieldName1', 'FieldName2', )
-
property
filter_horizontal¶ The unselected and selected ManyToManyField’s options appear in two boxes side by side.
By default, a ManyToManyField is displayed in the admin site with a <select multiple>. However, multiple-select boxes can be difficult to use when selecting many items. dding a ManyToManyField to this list will instead use a nifty unobtrusive JavaScript “filter” interface that allows searching within the options. he unselected and selected options appear in two boxes side by side. See filter_vertical to use a vertical interface.
1
filter_horizontal = ('ManyToManyFieldName1', 'ManyToManyFieldName2', )
-
static