From 1ae6c2acc5454301ec56dae9c05f848313ad143d Mon Sep 17 00:00:00 2001 From: tkin91e55 Date: Mon, 6 Jan 2025 12:47:23 +0800 Subject: [PATCH] comments_tree.html to comment_tree.html * The INSTALLED_APP order matters for the template overriding user's own app order should go before django_comments_xtd --- django_comments_xtd/templatetags/comments_xtd.py | 2 +- docs/extending.rst | 2 +- example/custom/README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/django_comments_xtd/templatetags/comments_xtd.py b/django_comments_xtd/templatetags/comments_xtd.py index 40c887e4..d0f82ba4 100644 --- a/django_comments_xtd/templatetags/comments_xtd.py +++ b/django_comments_xtd/templatetags/comments_xtd.py @@ -395,7 +395,7 @@ def render(self, context): def render_xtdcomment_tree(parser, token): """ Render the nested comment tree structure posted to the given object. - By default uses the template ``django_comments_xtd/comments_tree.html``. + By default uses the template ``django_comments_xtd/comment_tree.html``. Syntax:: diff --git a/docs/extending.rst b/docs/extending.rst index 2928cddc..9c056d7a 100644 --- a/docs/extending.rst +++ b/docs/extending.rst @@ -111,7 +111,7 @@ You will need to customize the following templates: * ``comments/form.html`` to include new fields. * ``comments/preview.html`` to preview new fields. * ``django_comments_xtd/email_confirmation_request.{txt|html}`` to add the new fields to the confirmation request, if it was necessary. This demo overrides them to include the ``title`` field in the mail. -* ``django_comments_xtd/comments_tree.html`` to show the new field when displaying the comments. If your project doesn't allow nested comments you can use either this template or `comments/list.html``. +* ``django_comments_xtd/comment_tree.html`` to show the new field when displaying the comments. If your project doesn't allow nested comments you can use either this template or `comments/list.html``. * ``django_comments_xtd/reply.html`` to show the new field when displaying the comment the user is replying to. diff --git a/example/custom/README.md b/example/custom/README.md index db995896..3c2b6bbe 100644 --- a/example/custom/README.md +++ b/example/custom/README.md @@ -3,7 +3,7 @@ The Custom Demo exhibits how to extend django-comments-xtd. This demo used the same **articles** app present in the other two demos, plus: * A new django application, called `mycomments`, with a model `MyComment` that extends the `django_comments_xtd.models.MyComment` model with a field `title`. - + To extend django-comments-xtd follow the next steps: 1. Set up `COMMENTS_APP` to `django_comments_xtd` @@ -13,5 +13,5 @@ To extend django-comments-xtd follow the next steps: * `comments/form.html` to include new fields. * `comments/preview.html` to preview new fields. * `django_comments_xtd/email_confirmation_request.{txt|html}` to add the new fields to the confirmation request, if it was necessary. This demo overrides them to include the `title` field in the mail. - * `django_comments_xtd/comments_tree.html` to show the new field when displaying the comments. If your project doesn't allow nested comments you can use either this template or `comments/list.html`. + * `django_comments_xtd/comment_tree.html` to show the new field when displaying the comments. If your project doesn't allow nested comments you can use either this template or `comments/list.html`. * `django_comments_xtd/reply.html` to show the new field when displaying the comment the user is replying to.