Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support coffin

  • Loading branch information...
commit 98ab908ed5e71a0967b43673e3bca29ee6df62fa 1 parent 3078f0d
David Cramer authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 django_histograms/templatetags/histograms.py
View
13 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)
Please sign in to comment.
Something went wrong with that request. Please try again.