My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 62: Find a way to build the a tagging cloud with the tag of only published entries
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  May 2009
Type-Defect
Priority-Medium
Milestone-Release0.3


Sign in to add a comment
 
Reported by patrick.hetu, May 16, 2009
It could be cool if we have a way without patching django-tagging for building a tags cloud with 
only the tags in published entries.

Now I do it with the template tag like that:

{% tag_cloud_for_model diario.Entry as tags with steps=2 min_count=1 distribution=log %}
{% for tag in tags %}
<span style="font-size: {{tag.font_size}}em"><a 
href="/tags/{{tag.name|slugify}}">{{tag}}</a></span>
{% endfor %}

but to get to what I want, I have to patch django-tagging with the patch that is attatch to that 
post.

Thanks and thank you for this awesome django-apps :)
diario_tags_cloud.patch
520 bytes Download
Comment 1 by semente, May 18, 2009
Hi, thank you! As soon as possible I will apply this patch.
Status: Accepted
Labels: Milestone-Release0.3
Comment 2 by semente, May 18, 2009
Oh no, this patch is for tagging... The tagging app is not part of diario neither
developed by me.

I will create a new template tag based on ``tag_cloud_for_model`` that fixes this
problem.

Thank you!
Comment 3 by semente, May 18, 2009
I tried to make a wrapper for ``do_tag_cloud_for_model`` to avoid copy all your code,
but not got success. I think is hard to maintain another ``do_tag_cloud_for_model``...

The easy way to fix this is changing default manager of Entry model, but it involves
other things. I need time to think about this.
Status: New
Labels: -Milestone-Release0.3
Comment 4 by patrick.hetu, May 30, 2009
What about creating a new 'diario_tag_cloud_for_model' template tag that wrap the 'do_tag_cloud_for_model' 
method and add the good filters? I attach the example.
diario_tags.py
366 bytes Download
Comment 5 by semente, May 31, 2009
Great! Fixed in r208.

Please review your name and email on AUTHORS file.

Thank you!
Status: Fixed
Labels: Milestone-Release0.3
Sign in to add a comment

Hosted by Google Code