mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
tag to read out dict value
This commit is contained in:
parent
bc46cca9f0
commit
58b6bbb236
@ -208,6 +208,17 @@ def get_color_theme_css(username):
|
||||
return inventree_css_static_url
|
||||
|
||||
|
||||
@register.filter
|
||||
def keyvalue(dict, key):
|
||||
"""
|
||||
access to key of supplied dict
|
||||
|
||||
usage:
|
||||
{% mydict|keyvalue:mykey %}
|
||||
"""
|
||||
return dict[key]
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def authorized_owners(group):
|
||||
""" Return authorized owners """
|
||||
|
Loading…
Reference in New Issue
Block a user