On 20 okt, 21:19, r_f_d <rich...@dahl.us> wrote: > Why not do this: > > for p in products.objects.all(): > for c in p.categories.all(): > print p,' - ', c > > -richard > > On Oct 20, 7:57 am, Михаил Лукин <mihail.lu...@googlemail.com> wrote: >
This will obviously leave you with a lot of queries. Take a look at eg django-selectreverse [1] for some help reducing your querycount for this type of nested lists. Koen [1]: http://code.google.com/p/django-selectreverse/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---