mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +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
|
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()
|
@register.simple_tag()
|
||||||
def authorized_owners(group):
|
def authorized_owners(group):
|
||||||
""" Return authorized owners """
|
""" Return authorized owners """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user