Closed GoogleCodeExporter closed 9 years ago
BTW, I'm happy to work on this myself, though it won't happen until after the
sprint.
Original comment by jacob.ka...@gmail.com
on 17 Mar 2008 at 4:51
[deleted comment]
This changes TagManager.usage_for_model to work on queryset-refactor.
It adds an optional queryset argument, but still supports the filters argument.
The filters, if specified, are added
to the queryset prior to introspection.
Original comment by jpwa...@gmail.com
on 17 Mar 2008 at 11:25
Attachments:
The tests that separate pre and post qsrf to ensure that the new usage_for_model
works without parse_lookup.
Original comment by newmani...@gmail.com
on 17 Mar 2008 at 11:26
Attachments:
The earlier patch makes TagManager.usage_for_model compatible for
queryset-refactor, but I thought the
syntax was kind of ugly: specifying both model and queryset violates DRY.
This version fixes TagManager.usage_for_model on queryset-refactor, but
maintains the original arguments.
It also provides a new method, TagManager.usage_for_queryset, that takes a
queryset argument and optional
counts and min_counts arguments. On queryset-refactor,
TagManager.usage_for_model contructs a queryset
from the specified model and filters and then lets
TagManager.usage_for_queryset do the work.
TagManager.usage_for_queryset raises AttributeError on pre-queryset-refactor
versions of Django.
Since there are now two methods performing basically the same query, I broke
the custom SQL out into its
own method, TagManager._get_usage, to avoid repeating it in both places. That
method can probably be
consolidated into TagManager.usage_for_queryset once support for
pre-queryset-refactor is dropped.
I've also included tests, based on the ones from newmaniese, that pass on trunk
and queryset-refactor. I
think they're pretty complete; they include tests using exclude and complex
filters.
Original comment by jpwa...@gmail.com
on 19 Mar 2008 at 5:33
Attachments:
So, qs-rf is in trunk now and this should be too.
Original comment by aenor.realm
on 27 Apr 2008 at 9:50
I agree, the model_or_queryset thing is pretty ugly - I'll try to make time
this week
to get working on this now that qs-rf has been merged into trunk.
Thanks for the patches and investigation.
Original comment by jonathan.buchanan
on 27 Apr 2008 at 10:05
In the meantime, the last patch of jpwatts seems to work (at least it work for
me).
Original comment by xphuture
on 27 Apr 2008 at 2:40
Ran into this bug today. Would be nice to see this fixed soon. Thanks for
everyone's hard work.
Original comment by clintec...@gmail.com
on 27 Apr 2008 at 8:11
How one use this patch? I really need tagging working here..
Original comment by italo.maia@gmail.com
on 29 Apr 2008 at 5:49
For this patch and any subversion patch, download this file in the trunk
directory of
the project. Enter patch -p0 < patchfile.diff, it should then tell you what
'hunks'
have been updated. Google patch subversion for more info.
Original comment by newmani...@gmail.com
on 29 Apr 2008 at 7:12
Thanks again for the patches - jpwatts' last patch has now been included in
revision 133.
Original comment by jonathan.buchanan
on 30 Apr 2008 at 10:30
thanks for the patch.. tagging is working again
Original comment by yash...@gmail.com
on 25 May 2008 at 5:16
Original issue reported on code.google.com by
jacob.ka...@gmail.com
on 17 Mar 2008 at 4:50