1 from django import template
2
3 register = template.Library()
4
5 def choice(choices, value):
6 return choices[value]
7
8 register.filter('choice', choice)