django.contrib.comments feed should allow filtering based on ContentType and object instance.
|Reported by:||kylefox||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)
Changed 6 years ago by kylefox
comment:1 Changed 6 years ago by kylefox
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:5 Changed 4 years ago by jezdez
- Owner changed from nobody to jezdez
- Status changed from new to assigned
comment:7 Changed 3 years ago by julien
- Easy pickings unset
- Needs documentation set
- Needs tests set
- Severity set to Normal
- Type set to New feature