From e69f7da0dc610528b19fa868f273ca4089b0f7fb Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 8 Jun 2014 19:52:11 -0400 Subject: finished up notes app. still need to design and test, but it more or less works. --- app/lib/templatetags/templatetags/month_number_to_name.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/lib/templatetags/templatetags/month_number_to_name.py (limited to 'app/lib') diff --git a/app/lib/templatetags/templatetags/month_number_to_name.py b/app/lib/templatetags/templatetags/month_number_to_name.py new file mode 100644 index 0000000..69bd7e6 --- /dev/null +++ b/app/lib/templatetags/templatetags/month_number_to_name.py @@ -0,0 +1,7 @@ +import calendar +from django import template +register = template.Library() + +@register.filter +def month_number_to_name(month_number): + return calendar.month_name[int(month_number)] -- cgit v1.2.3