From 4fd2f4104fa415701ed925a990c8bf305ff943df Mon Sep 17 00:00:00 2001 From: khchine5 Date: Thu, 7 Apr 2016 16:47:41 +0100 Subject: [PATCH] Fix templatetag tests --- pinax/comments/templatetags/pinax_comments_tags.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pinax/comments/templatetags/pinax_comments_tags.py b/pinax/comments/templatetags/pinax_comments_tags.py index dec004e..2e09370 100644 --- a/pinax/comments/templatetags/pinax_comments_tags.py +++ b/pinax/comments/templatetags/pinax_comments_tags.py @@ -28,7 +28,6 @@ def can_delete_comment(comment, user): def comment_count(object): """ Usage: - {% comment_count obj %} or {% comment_count obj as var %} @@ -43,7 +42,6 @@ def comment_count(object): def comments(object): """ Usage: - {% comments obj as var %} """ return Comment.objects.filter( @@ -56,9 +54,7 @@ def comments(object): def comment_form(context, object): """ Usage: - {% comment_form obj as comment_form %} - Will read the `user` var out of the contex to know if the form should be form an auth'd user or not. """ @@ -72,7 +68,9 @@ def comment_form(context, object): def comment_target(object): """ Usage: - {% comment_target obj [as varname] %} """ - return reverse("pinax_comments:post_comment", args=[ContentType.objects.get_for_model(object).pk, object.pk]) + return reverse("post_comment", kwargs={ + "content_type_id": ContentType.objects.get_for_model(object).pk, + "object_id": object.pk + })