Code

Opened 6 years ago

Closed 13 months ago

#8729 closed New feature (wontfix)

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

Reported by: kylefox 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 kylefox 6 years ago.
Allows filtering of django.contrib.comments feed described in #8729

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by kylefox

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

comment:1 Changed 6 years ago by kylefox

  • 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 6 years ago by ramiro

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 5 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:4 Changed 5 years ago by jacob

  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 4 years ago by jezdez

  • Owner changed from nobody to jezdez
  • Status changed from new to assigned

comment:6 Changed 4 years ago by jezdez

  • Owner jezdez deleted
  • Status changed from assigned to new

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

comment:8 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:9 Changed 13 months ago by jacob

  • Resolution set to wontfix
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.