filters
management.filters
¤
Classes¤
FilterVisible(target, model, field=None)
¤
Filter objects the user has permission to view.
Standard filter shows ALL objects available in the database when faced with a ForeignKey field. This filter shows only the objects that appear in the target model objects that the user has permission to view.
If field is None, the name of the model
model is used.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target |
type[Model]
|
Model containing the objects. |
required |
model |
type[Model]
|
Model of the objects to display. |
required |
field |
str | None
|
Field to filter by. Defaults to None. |
None
|
Source code in management\filters.py
22 23 24 25 26 27 28 |
|