Code Monkey home page Code Monkey logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 22, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.