#4404: LatestCommentsFeed causing AssertionError due to slicing
----------------------------------------------------+-----------------------
Reporter: Stuart Williams <[EMAIL PROTECTED]> | Owner:
adrian
Status: new | Component:
django.contrib.comments
Version: SVN | Resolution:
Keywords: | Stage:
Ready for checkin
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
----------------------------------------------------+-----------------------
Old description:
> LatestCommentsFeed from contrib/comments/feeds.py calls upon
> LatestFreeCommentsFeed, which slices the result. This causes an
> AssertionError:
>
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py"
> in get_response
> 77. response = callback(request, *callback_args, **callback_kwargs)
> File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
> views.py" in feed
> 19. feedgen = f(slug, request.path).get_feed(param)
> File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
> feeds.py" in get_feed
> 94. for item in self.__get_dynamic_attr('items', obj):
> File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
> feeds.py" in __get_dynamic_attr
> 51. return attr()
> File "/usr/lib/python2.5/site-packages/django/contrib/comments/
> feeds.py" in items
> 36. qs = qs.filter(is_removed=False)
> File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
> filter
> 368. return self._filter_or_exclude(None, *args, **kwargs)
> File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
> _filter_or_exclude
> 381. "Cannot filter a query once a slice has been taken."
>
> AssertionError at /rss/comments/
> Cannot filter a query once a slice has been taken.
>
> Sorry about the lack of further details, but I'm pretty new to both
> Python and Django... Thanks!
New description:
!LatestCommentsFeed from contrib/comments/feeds.py calls upon
!LatestFreeCommentsFeed, which slices the result. This causes an
!AssertionError:
{{{
#!python
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py"
in get_response
77. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
views.py" in feed
19. feedgen = f(slug, request.path).get_feed(param)
File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
feeds.py" in get_feed
94. for item in self.__get_dynamic_attr('items', obj):
File "/usr/lib/python2.5/site-packages/django/contrib/syndication/
feeds.py" in __get_dynamic_attr
51. return attr()
File "/usr/lib/python2.5/site-packages/django/contrib/comments/
feeds.py" in items
36. qs = qs.filter(is_removed=False)
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
filter
368. return self._filter_or_exclude(None, *args, **kwargs)
File "/usr/lib/python2.5/site-packages/django/db/models/query.py" in
_filter_or_exclude
381. "Cannot filter a query once a slice has been taken."
AssertionError at /rss/comments/
Cannot filter a query once a slice has been taken.
}}}
Sorry about the lack of further details, but I'm pretty new to both Python
and Django... Thanks!
Comment (by mtredinnick):
--
Ticket URL: <http://code.djangoproject.com/ticket/4404#comment:4>
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
-~----------~----~----~----~------~----~------~--~---