diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2021-08-19 12:19:41 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2021-08-19 12:20:00 +0200 |
commit | 9f474d32ef47b02868a31bd59eaf969087d67a16 (patch) | |
tree | 392dbb55ffd35623fc973e03e7ce29dc89a2acf0 /client/templatetags/app_filter.py | |
parent | RO documents for non primary groups (diff) | |
download | scout-subs-9f474d32ef47b02868a31bd59eaf969087d67a16.tar.gz scout-subs-9f474d32ef47b02868a31bd59eaf969087d67a16.zip |
use query instead of for loop in client
Diffstat (limited to 'client/templatetags/app_filter.py')
-rw-r--r-- | client/templatetags/app_filter.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/templatetags/app_filter.py b/client/templatetags/app_filter.py new file mode 100644 index 0000000..3120b8e --- /dev/null +++ b/client/templatetags/app_filter.py @@ -0,0 +1,7 @@ +from django import template +from client.models import KeyVal + +register = template.Library() +@register.filter(name="doc_key") +def doc_key(doc): + return KeyVal.objects.filter(container=doc)
\ No newline at end of file |