@@ -0,0 +1,759 @@
+# -*- encoding:utf-8 -*-%0A# Template tag%0Afrom django.template.defaultfilters import stringfilter%0Afrom datetime import datetime, timedelta%0Afrom django import template%0A%0Aregister = template.Library()%0A%0A@register.filter%0Adef event_time(start, end):%0A    today = datetime.today ()%0A    result = %22%22%0A%0A    if start == today:%0A        result += %22aujourd'hui %22%0A    else:%0A        result += %22le %25s %22 %25 start.strftime (%22%25A %25d %25B %25Y%22)%0A%0A    if start.day == end.day and start.month == end.month and start.year == end.year:%0A        result += %22de %25s %22 %25 start.strftime (%22%25H:%25M%22)%0A        result += %22%C3%A0 %25s %22 %25 end.strftime (%22%25H:%25M%22)%0A    else:%0A        result += %22%C3%A0 %25s%22 %25 start.strftime (%22%25H:%25M%22)%0A        result += %22jusqu'au %25s%22 %25 end.strftime (%22%25A %25d %25B %25Y %C3%A0 %25H:%25M%22)%0A%0A    return result%0A%0A

Add a template tag filter to properly format the time of events