#10285 closed (fixed)
Render comment list
Reported by: | Kyle Fuller | Owned by: | Kyle Fuller |
---|---|---|---|
Component: | contrib.comments | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This patch adds the ability to render a comment list directly.
It tries the following templates:
- "comments/<app>/<model>/list.html",
- "comments/<app>/list.html",
- "comments/list.html"
Once it has found a template, it will pass a list of comments. This templatetag stop repetition as many templates I have written are implementing a comment list again and again.
The templatetag can be used like:
{% render_comment_list for [object] %} {% render_comment_list for [app].[model] [object_id] %}
Attachments (5)
Change History (12)
by , 16 years ago
comment:1 by , 16 years ago
milestone: | → 1.1 beta |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 16 years ago
Attachment: | templatetag_tests.diff added |
---|
Diff for django/trunk/tests/regressiontests/comment_tests/tests/templatetag_tests.py at rev 8557
comment:2 by , 16 years ago
Summary: | Render commet list → Render comment list |
---|
comment:3 by , 16 years ago
milestone: | 1.1 beta → 1.2 |
---|
The patch doesn't apply cleanly because it's not in unified diff format, and even when applied by hand the tests fail. Looks like this won't make it into 1.1.
comment:4 by , 16 years ago
I have fixed the problem with the tests. I have attached the file render_comment_list.diff
, this is the output from the command
svn diff
.
comment:5 by , 16 years ago
Fixed this, on my git repo (git://github.com/kylef/django.git), commit d042fde575d2f28b0d4f155efd1c78269ae2377d
If anyone wants to pull and merge it into svn/django.
comment:6 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
django/contrib/comments/templates/comments/list.html