dlamotte / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

tag_cloud_for_model should take a template variable as model #209

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
right now the template tag expects a string as tag model, but if you use a
template variable instead (like tag_model here) ull get an error:

{% tag_cloud_for_model tag_model as tags with steps=4 min_count=18
distribution=log %}

however a fix for this would be fairly easy to implement:
if len(self.model.split('.')) < 2:
  self.model = context[self.model]
add these two lines at the beginning of render() in class TagCloudForModelNode

Original issue reported on code.google.com by merowing...@gmail.com on 10 Aug 2009 at 6:13