Skip to content
Snippets Groups Projects
Commit 5e3dadb2 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Add custom templatetag for getting dict item directly by key

parent 38211b6a
No related branches found
No related tags found
No related merge requests found
......@@ -348,6 +348,7 @@ INSTALLED_APPS = [
'django.contrib.messages',
'alerts',
'api',
'core',
'events',
'ligoauth',
'search',
......
from django import template
register = template.Library()
@register.filter
def get_item(dictionary, key):
return dictionary.get(key)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment