Comments (8)
Yes, it would be great to have this kind of behaviour for the objects managers.
In my case, i wish to have paginated tag clouds and cannot use the generic
object_list for that purpose.
Original comment by [email protected]
on 18 Jun 2007 at 8:40
- Added labels: ****
- Removed labels: ****
from django-tagging.
Do you know of any half-decent way to get the necessary GROUP BY statements
into the
ORM in order to achieve this?
If there isn't one, I think we'll have to hold out for the QuerySet refactor
landing
in trunk.
The docstring on `TaggedItemManager.get_intersection_by_model` speaks for a few
places at the moment :)
Original comment by jonathan.buchanan
on 21 Aug 2007 at 12:51
- Changed state: Chatting
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from django-tagging.
I've written a patch that updates `usage_for_*` to return a queryset object. I
wasn't trying to add this feature,
just make `usage_for_queryset` work, as it seemed to be returning a list of
tags for ALL objects of the same
type as the passed in queryset, not only objects in the passed in queryset.
Original comment by [email protected]
on 8 Apr 2009 at 5:32
- Added labels: ****
- Removed labels: ****
Attachments:
from django-tagging.
I really need this feature for a project I'm working on... specifically the
example:
Tag.objects.usage_for_model(Item, counts=True).order_by('-count')
Can anyone suggest how I can achieve the same result in the meantime?
Original comment by [email protected]
on 10 Sep 2009 at 10:55
- Added labels: ****
- Removed labels: ****
from django-tagging.
Any updates on this issue? I'm wondering why `usage_for_model` returns a list
in the first place, rather than a
queryset...
Original comment by kyle.fox
on 20 Oct 2009 at 3:05
- Added labels: ****
- Removed labels: ****
from django-tagging.
For anyone interested in a solution to order the tags by count in the
templates: the
built in django {% regroup %} tag can be used quite effectively.
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#regroup
Scroll down, just above the next section (spaceless tag), and you will see how
to
order the set. I ended up with this:
{% regroup tag_list|dictsort:"count" by count as sorted_tags %}
<div class="portlet" id="tag_list">
{% for tags in sorted_tags %}
<h3>Tags</h3>
<ul>
{% for tag in tags.list %}
<li><a href="#">{{ tag }} ({{ tag.count }})</a></li>
{% endfor %}
</ul>
{% endfor %}
</div>
Original comment by [email protected]
on 23 Oct 2009 at 6:45
- Added labels: ****
- Removed labels: ****
from django-tagging.
Any update on this please? This will be a very useful feature.
Original comment by madhusudancs
on 16 Jan 2011 at 12:14
- Added labels: ****
- Removed labels: ****
from django-tagging.
My patch above still works, but it won't apply cleanly to trunk anymore, thanks
to r172.
I've attached an updated patch that applies cleanly to 0.3.1.
Disappointed that this hasn't been resolved in over 2 years now. This looks
like abandonware, with all the issues continuing to pile up.
Original comment by [email protected]
on 19 Jul 2011 at 12:46
- Added labels: ****
- Removed labels: ****
Attachments:
from django-tagging.
Related Issues (20)
- Default abstract model manager trumped by tagging manager...
- Add support for South migrations of TagField HOT 1
- Hiding toolbar bug HOT 1
- Bug in bookmark navigator. HOT 1
- Changing shortcut key bug. HOT 1
- New project with existing sources HOT 1
- Input widget for jQuery TagIt plugin HOT 1
- Make Tag respect MAX_TAG_LENGTH
- Github and module status?
- Doc: Revision 158 does not match PyPi version 0.1.3 or google code 0.1.3 download HOT 1
- Linked documentation site down HOT 2
- HOWTO get list of model instances that have no tags assigned?
- 1062 integrity error when saving a model HOT 1
- tagging.views uses function-based generic views, to be deprecated
- Patch for /branches/0.3.X/tagging/models.py
- Doesn t work on django 1.5 HOT 1
- [deleted issue]
- Update tagging to PyPI
- Patch for /trunk/tagging/utils.py
- Warning Django1.7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-tagging.