django.contrib.comments feed should allow filtering based on ContentType and object instance.
|Reported by:||Kyle Fox||Owned by:|
|Severity:||Normal||Keywords:||comments, feed, syndication|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||no|
A common use-case for syndicating comments is to provide a feed of comments attached to a specific object (say, a blog post with ID 42). This patch allows the comment feed to be filtered based on ContentType and object instance, like so:
Comments filtered by ContentType: /feeds/comments/<app>.<model>/
Provides a feed of all public comments attached to the specified ContentType. For example, the URL /feeds/comments/blog.post/ would return all public comments attached to the Post model in the 'blog' app. Note that the model name needs to be lowercase.
Comments filtered by a specific object: /feeds/comments/<app>.<model>/<pk_val>/
Provides a feed of all public comments attached to the object specified by the parameters . For example, the URL /feeds/comments/blog.post/42/ would return all public comments attached to the Post with pk=42 in the 'blog' app.
Note: This is the first time I've created a ticket/patch, so I would appreciate any advice regarding the code or this ticket. Thanks.
Change History (10)
comment:1 Changed 8 years ago by
|Patch needs improvement:||unset|
comment:7 Changed 5 years ago by
|Type:||→ New feature|