Permalink
Browse files

revert that last one, i was wrong

  • Loading branch information...
1 parent 712b633 commit 6715ac551894a82723e9b28ecdece1248a4fb4f2 David Cramer committed Nov 13, 2009
Showing with 17 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +16 −0 django_histograms/templatetags/histograms.py
View
@@ -1,2 +1,3 @@
*.pyc
*.pyo
+/django_admin_histograms.egg-info
@@ -0,0 +1,16 @@
+from django_histograms.utils import Histogram
+from django import template
+
+register = template.Library()
+
+def histogram_for(model, attname):
+ return Histogram(model, attname).render(css=True)
+register.simple_tag(histogram_for)
+
+try:
+ from coffin import template
+except ImportError:
+ pass
+else:
+ register = template.Library()
+ register.object(histogram_for)

0 comments on commit 6715ac5

Please sign in to comment.