I am not aware what 'relations' can do or if there was anything like
'relations' let alone 'GenericRelations' :)
What does the Sum('vote') done?
--
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
On May 6, 2011, at 8:35 AM, Shawn Milochik wrote:
> Sorry, I was going off of your pasted code.
>
> Sounds like this could be a case for annotate.
> http://docs.djangoproject.com/en/1.3/ref/models/querysets/#annotate
>
> I recommend reading this whole page, along with the two prerequisite pages
Sorry, I was going off of your pasted code.
Sounds like this could be a case for annotate.
http://docs.djangoproject.com/en/1.3/ref/models/querysets/#annotate
I recommend reading this whole page, along with the two prerequisite
pages called for at the top. It'll help a lot.
--
You received th
Appreciate your response, Shawn. I am a newbie and struggling.
Yea, but that is 'latest'. I need ascending descending order by
score/votes. Can't seem to figure that one out. That would go in the else
part. By default in my app, I want the comments to be sorted by vote/score.
else:#This is
You could probably sort ascending, take a subset, then reverse the search.
Something like this:
| .order_by('created_datetime', 'modified_datetime')[:100].reverse()|
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, s
5 matches
Mail list logo