Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Final cleanup for template tags.

  • Loading branch information...
commit a855b0fb8dff38541d841411072f1d27df7bf364 1 parent 126d560
David Cramer authored
View
6 django_histograms/templates/histogram/report.html → django_histograms/templates/histograms/report.html
@@ -1,7 +1,7 @@
{% if css %}
-<style type="text/css">
-{{ css }}
-</style>
+ <style type="text/css">
+ {{ css }}
+ </style>
{% endif %}
{% for month, data in results %}
<div class="histogram">
View
16 django_histograms/templatetags/histograms.py
@@ -6,14 +6,14 @@
def histogram_for(model, attname):
if isinstance(model, basestring):
- model = get_model(*models.split('.'))
+ model = get_model(*model.split('.'))
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)
+# try:
+# from coffin import template
+# except ImportError:
+# pass
+# else:
+# register = template.Library()
+# register.object(histogram_for)
View
2  django_histograms/utils.py
@@ -66,7 +66,7 @@ def __init__(self, model, attname, queryset=None):
self._queryset = None
def render(self, css=False):
- context = self.get_report(self.attname)
+ context = self.get_report()
if css:
context['css'] = HISTOGRAM_CSS
return render_to_string("histogram/report.html", context)
Please sign in to comment.
Something went wrong with that request. Please try again.