1 from django import template
2 from django.utils.dates import MONTHS, MONTHS_AP
4 register = template.Library()
8 if 1 <= monthnum <= 12:
9 return MONTHS[monthnum]
13 register.filter('monthname', monthname)
15 def apmonthname(value):
17 if 1 <= monthnum <= 12:
18 return MONTHS_AP[monthnum]
22 register.filter('apmonthname', apmonthname)