danirus / django-comments-xtd

A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
https://django-comments-xtd.readthedocs.io
BSD 2-Clause "Simplified" License
594 stars 158 forks source link

RenderXtdCommentTree - comments from context_dict #295

Closed dest81 closed 3 years ago

dest81 commented 3 years ago

Render comments from context_dict first if 'comments' were passed in cvars.

Let's say I don't have name 'comments' in context but I use 'top_comments'. Then I render comments with tag in the template: {% render_xtdcomment_tree with comments=top_commets %} This throws error because check is happening only in context but 'top_comments' are in context_dict: https://github.com/danirus/django-comments-xtd/blob/master/django_comments_xtd/templatetags/comments_xtd.py#L332-L338