* kgodey:
Fixing a double declaration of the monthname filter, and renaming ap_monthname to apmonthname (matches apnumber from django.contrib.humanize).
Added templatetags "monthname" and "ap_monthname" to Penfield, which turn month numbers into month names.
--- /dev/null
+from django import template
+from django.utils.dates import MONTHS, MONTHS_AP
+
+register = template.Library()
+
+def monthname(value):
+ monthnum = int(value)
+ if 1 <= monthnum <= 12:
+ return MONTHS[monthnum]
+ else:
+ return value
+
+register.filter('monthname', monthname)
+
+def apmonthname(value):
+ monthnum = int(value)
+ if 1 <= monthnum <= 12:
+ return MONTHS_AP[monthnum]
+ else:
+ return value
+
+register.filter('apmonthname', apmonthname)