Open GoogleCodeExporter opened 9 years ago
btw, I was thinking that such mptt technique will not be available with django
orm.
Nice :).
Original comment by mocksoul
on 5 Dec 2008 at 11:04
Oh yes, templatetags should be fixed for this patch.
Original comment by mocksoul
on 5 Dec 2008 at 11:14
This will fix templatetags, althouth with no ability to utilize my patch
features.
=== modified file 'mptt/utils.py'
--- mptt/utils.py 2008-12-05 00:17:36 +0000
+++ mptt/utils.py 2008-12-05 23:16:07 +0000
@@ -128,7 +128,7 @@
"""
if rel_cls and rel_field and count_attr:
children = node._tree_manager.add_related_count(
- node.get_children(), rel_cls, rel_field, count_attr, cumulative)
+ node.get_children(), rel_cls.objects.all(), rel_field, count_attr,
cumulative)
else:
children = node.get_children()
return itertools.chain(node.get_ancestors(), [node], children)
Original comment by mocksoul
on 5 Dec 2008 at 11:17
mocksoul
Could this be accomplished with annotate() in Django 1.1+ ?
Thanks
Original comment by craig.ds@gmail.com
on 3 Sep 2010 at 12:23
Indeed it looks like annotate would provide similar/same functionality but the
performance/queries should be tested - as to which implementation (this patch
or annotate) gives better performance.
I hope mocksoul is still interested in this and can shed a bit of light on this
matter.
Original comment by matjaz.c...@gmail.com
on 7 Sep 2010 at 12:51
[deleted comment]
[deleted comment]
Migrated to https://github.com/django-mptt/django-mptt/issues#issue/62
Original comment by craig.ds@gmail.com
on 19 Dec 2010 at 1:06
Original issue reported on code.google.com by
mocksoul
on 5 Dec 2008 at 11:03Attachments: