mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#6372: Move object list search panel into collapsed view & remove search field
This commit is contained in:
@@ -249,6 +249,15 @@ def get_key(value: Dict, arg: str) -> Any:
|
||||
return value.get(arg, None)
|
||||
|
||||
|
||||
@register.filter
|
||||
def get_item(value: object, attr: str) -> Any:
|
||||
"""
|
||||
Template implementation of `__getitem__`, for accessing the `__getitem__` method
|
||||
of a class from a template.
|
||||
"""
|
||||
return value[attr]
|
||||
|
||||
|
||||
#
|
||||
# Tags
|
||||
#
|
||||
|
Reference in New Issue
Block a user