Alternately you could inherit the base functionality and simply add the output you're looking for. (again with a custom filter).
Here's a custom template fitler which adds a new argument 'c' that will change (get it, c... change) the functional of a/A. It basically serves as a switch to toggle the functionality of a/A. That's hard to explain. Here's some examples:
{{ datetime|smartdate:"h:i A" }} = '12:30 AM'
{{ datetime|smartdate:"h:i Ac" }} = '12:30 A.M.'
{{ datetime|smartdate:"h:i a" }} = '12:30 a.m.'
{{ datetime|smartdate:"h:i ac" }} = '12:30 am'
And here's the filter...
import re
from django.template.defaultfilters import date as date_filter
# --------------------------------------------------------------------------------
# |smartdate:"date format" -- new arg 'c' (change) alteras the AM/pm appearance
# --------------------------------------------------------------------------------
@register.filter
def smartdate(value, arg):
rendered = date_filter(value, arg)
if 'c' in arg:
rendered = re.sub('(a|p)\.m\.c', lambda m: '%sm' % m.group(1), rendered)
rendered = re.sub('(A|P)Mc', lambda m: '%s.M.' % m.group(1), rendered)
return rendered
Edit -- Slightly optimized the filter