add custom template tag to get ordered air quality indices
This commit is contained in:
parent
5cae14effc
commit
2a48ad2a6a
|
@ -716,3 +716,9 @@ def get_goto_cell(page, request):
|
|||
@register.assignment_tag
|
||||
def get_collectivity_slugs():
|
||||
return COLLECTIVITY_LABELS.keys()
|
||||
|
||||
@register.filter
|
||||
def indice_values(indices):
|
||||
for key in ('indice_j-1', 'indice_j', 'indice_j+1'):
|
||||
if indices.get(key):
|
||||
yield indices.get(key)
|
||||
|
|
Loading…
Reference in New Issue