Permalink
Browse files

Support coffin

  • Loading branch information...
1 parent 3078f0d commit 98ab908ed5e71a0967b43673e3bca29ee6df62fa David Cramer committed Nov 13, 2009
Showing with 5 additions and 8 deletions.
  1. +5 −8 django_histograms/templatetags/histograms.py
@@ -2,6 +2,11 @@
from django import template
from django.db.models import get_model
+try:
+ from coffin import template
+except ImportError:
+ pass
+
register = template.Library()
def histogram_for(model, attname, months=2, day_labels=True):
@@ -15,11 +20,3 @@ def histogram_for_days(model, attname, days=31, day_labels=True):
model = get_model(*model.split('.'))
return Histogram(model, str(attname), days=days).render(css=True, day_labels=day_labels)
register.simple_tag(histogram_for_days)
-
-# try:
-# from coffin import template
-# except ImportError:
-# pass
-# else:
-# register = template.Library()
-# register.object(histogram_for)

0 comments on commit 98ab908

Please sign in to comment.