Re: Advanced Annotate

2015-09-17 Thread Carsten Fuchs
Hi Paolo, Am 16.09.2015 um 22:52 schrieb Paolo C.: [...], I need to annotate not only the price but also which is the book that has that max value. Isn't that exactly what I was wondering about, too? "1) Is there a way to annotate each Store object with the actual Book objects related to th

Re: Advanced Annotate

2015-09-16 Thread Paolo C.
Hi Carsten, my problem is slightly different, in your example you wanted to annotate for example the max_book price, I need to annotate not only the price but also which is the book that has that max value. Thanks -- You received this message because you are subscribed to the Google Groups

Re: Advanced Annotate

2015-09-16 Thread Carsten Fuchs
Hi Paolo, Am 15.09.2015 um 00:32 schrieb Paolo C.: How can obtain details from the last comment when listing ll posts? If I understood your question correctly -- I recently had the same question, see https://groups.google.com/d/msg/django-users/adRe2_BWMz0/G71BVUEI_7oJ for details. It seems

Advanced Annotate

2015-09-14 Thread Paolo C.
I've posted this <http://stackoverflow.com/questions/32555097/django-advanced-annotate> issue on Stackoverflow Given this model: from django.db import models class Post(models.Model): text = models.CharField(max_length=255) class Comment(models.Model): text = model