Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renaming to conform to brosner's standards.

  • Loading branch information...
commit c33034bfa109d85b923067a2f7f400d8c58429d0 1 parent 6efa393
@alex alex authored
Showing with 9 additions and 9 deletions.
  1. +5 −5 dialogos/templatetags/dialogos_tags.py
  2. +4 −4 dialogos/tests.py
View
10 dialogos/templatetags/dialogos_tags.py
@@ -55,21 +55,21 @@ def render(self, context):
@register.tag
-def get_comment_count(parser, token):
+def comment_count(parser, token):
"""
Usage:
- {% get_comment_count obj %}
+ {% comment_count obj %}
or
- {% get_comment_count obj as var %}
+ {% comment_count obj as var %}
"""
return CommentCountNode.handle_token(parser, token)
@register.tag
-def get_comments(parser, token):
+def comments(parser, token):
"""
Usage:
- {% get_comments obj as var %}
+ {% comments obj as var %}
"""
return CommentsNode.handle_token(parser, token)
View
8 dialogos/tests.py
@@ -56,7 +56,7 @@ def test_post_comment(self):
self.assertEqual(c.comment, "I thought you were watching the hobbits?")
self.assertEqual(c.author, self.user)
- def test_ttag_get_comment_count(self):
+ def test_ttag_comment_count(self):
g = User.objects.create(username="Sauron")
self.post_comment(g, data={
"name": "Gandalf",
@@ -68,12 +68,12 @@ def test_ttag_get_comment_count(self):
})
self.assert_renders(
- "{% load dialogos_tags %}{% get_comment_count o %}",
+ "{% load dialogos_tags %}{% comment_count o %}",
Context({"o": g}),
"2"
)
- def test_ttag_get_comments(self):
+ def test_ttag_comments(self):
g = User.objects.create(username="Sauron")
self.post_comment(g, data={
"name": "Gandalf",
@@ -86,7 +86,7 @@ def test_ttag_get_comments(self):
c = Context({"o": g})
self.assert_renders(
- "{% load dialogos_tags %}{% get_comments o as cs %}",
+ "{% load dialogos_tags %}{% comments o as cs %}",
c,
""
)

0 comments on commit c33034b

Please sign in to comment.
Something went wrong with that request. Please try again.