Admin integration
django-queryable-properties comes with an integration in Django’s admin, allowing to use queryable properties in
various places in both ModelAdmin subclasses and inlines.
To properly get queryable properties to work with certain features of admins/inlines, django-queryable-properties
offers specialized base classes that can be used instead of Django’s regular base classes:
queryable_properties.admin.QueryablePropertiesAdminin place of Django’s ModelAdminqueryable_properties.admin.QueryablePropertiesStackedInlinein place of Django’s StackedInlinequeryable_properties.admin.QueryablePropertiesTabularInlinein place of Django’s TabularInline
For more complex inheritance scenarios, there is also the
queryable_properties.admin.QueryablePropertiesAdminMixin, which can be added to both admin and inline classes
to enable queryable properties functionality while using different admin/inline base classes.
The following table shows the admin/inline options that queryable properties may be referenced in and whether each
feature requires the use of one of the specialized base classes mentioned above.
Queryable properties may be refenced via name in either the listed admin/inline class attributes or in the result of
their corresponding get_* methods.
Admin/inline option |
Requires special class |
Restrictions/Remarks |
|---|---|---|
|
No |
|
|
|
|
|
See |
|
|
Yes |
|
|
Yes |
|
|
Yes |
|
|
No |
|
|
No |
|
|
See |
|