diff --git a/django/contrib/comments/templatetags/comments.py b/django/contrib/comments/templatetags/comments.py
index 563a3ff..b5b02c8 100644
a
|
b
|
from django.utils.encoding import smart_unicode
|
7 | 7 | |
8 | 8 | register = template.Library() |
9 | 9 | |
| 10 | comment_app = comments.get_comment_app() |
| 11 | |
10 | 12 | class BaseCommentNode(template.Node): |
11 | 13 | """ |
12 | 14 | Base helper class (abstract) for handling the get_comment_* template tags. |
… |
… |
class BaseCommentNode(template.Node):
|
59 | 61 | def __init__(self, ctype=None, object_pk_expr=None, object_expr=None, as_varname=None, comment=None): |
60 | 62 | if ctype is None and object_expr is None: |
61 | 63 | raise template.TemplateSyntaxError("Comment nodes must be given either a literal object or a ctype and object pk.") |
62 | | self.comment_model = comments.get_model() |
| 64 | self.comment_model = comment_app.get_model() |
63 | 65 | self.as_varname = as_varname |
64 | 66 | self.ctype = ctype |
65 | 67 | self.object_pk_expr = object_pk_expr |
… |
… |
class CommentFormNode(BaseCommentNode):
|
117 | 119 | def get_form(self, context): |
118 | 120 | ctype, object_pk = self.get_target_ctype_pk(context) |
119 | 121 | if object_pk: |
120 | | return comments.get_form()(ctype.get_object_for_this_type(pk=object_pk)) |
| 122 | return comment_app.get_form()(ctype.get_object_for_this_type(pk=object_pk)) |
121 | 123 | else: |
122 | 124 | return None |
123 | 125 | |
… |
… |
def comment_form_target():
|
243 | 245 | |
244 | 246 | <form action="{% comment_form_target %}" method="POST"> |
245 | 247 | """ |
246 | | return comments.get_form_target() |
| 248 | return comment_app.get_form_target() |
247 | 249 | |
248 | 250 | register.tag(get_comment_count) |
249 | 251 | register.tag(get_comment_list) |