#2256: queryset.count() does not work correctly with sliced querysets
------------------------------------+---------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: Database wrapper
Version: | Resolution:
Keywords: queryset count limit | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 1
------------------------------------+---------------------------------------
Comment (by SmileyChris):
Maybe I'm not following, but you can't slice a `count()` result as it does
not return a `QuerySet`.
It seems pretty Python-intuitive that `len(articles[:5]) ==
articles[:5].count()`.
Thanks for picking up that bug, I'll fix now.
--
Ticket URL: <http://code.djangoproject.com/ticket/2256#comment:15>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---