Opened 8 years ago

Closed 4 years ago

#8729 closed New feature (wontfix)

django.contrib.comments feed should allow filtering based on ContentType and object instance.

Reported by: Kyle Fox Owned by:
Component: contrib.comments Version: master
Severity: Normal Keywords: comments, feed, syndication
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Attachments (1)

8729.diff (4.0 KB) - added by Kyle Fox 8 years ago.
Allows filtering of django.contrib.comments feed described in #8729

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by Kyle Fox

Attachment: 8729.diff added

Allows filtering of django.contrib.comments feed described in #8729

comment:1 Changed 8 years ago by Kyle Fox

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

I'm not sure why the diff file is not showing correctly in Trac. It appears properly when you download in original format, however.

(If anyone knows why it's broken in Trac, please let me know and I will upload a new version).

comment:2 Changed 8 years ago by Ramiro Morales

There is no need to worry, the patch parser of this old Trac version has some problems to render in HTML some patches (possible causes are \ No newline at end of file, the size of the patch, the patch has been generated by a tool different from svn diff, ...). But, as you've already realized, you patch is safe and will be reviewed by a triager or core developer.

comment:3 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:4 Changed 8 years ago by Jacob

Triage Stage: UnreviewedAccepted

comment:5 Changed 7 years ago by Jannis Leidel

Owner: changed from nobody to Jannis Leidel
Status: newassigned

comment:6 Changed 7 years ago by Jannis Leidel

Owner: Jannis Leidel deleted
Status: assignednew

comment:7 Changed 5 years ago by Julien Phalip

Easy pickings: unset
Needs documentation: set
Needs tests: set
Severity: Normal
Type: New feature

comment:8 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:9 Changed 4 years ago by Jacob

Resolution: wontfix
Status: newclosed

django.contrib.comments has been deprecated and is no longer supported, so I'm closing this ticket. We're encouraging users to transition to a custom solution, or to a hosted solution like Disqus.

The code itself has moved to https://github.com/django/django-contrib-comments; if you want to keep using it, you could move this bug over there.

Note: See TracTickets for help on using tickets.
Back to Top