Commit 2f7564441ea17148b97a28036f71792682eba61d

Authored by Claude Paroz
1 parent 29763a5f

Moved test tag library to templatetags dir

Dynamic library registration is harder to do to keep backwards
compatibility.
  1 +from django.template import Library
  2 +
  3 +register = Library()
  4 +
  5 +
  6 +@register.filter
  7 +def noop(variable, param=None):
  8 + return variable
... ...
1 1 from __future__ import absolute_import
2 2
3 3 from django.contrib.contenttypes.models import ContentType
4   -from django.template import Template, Context, Library
5   -from django.template.base import libraries
  4 +from django.template import Template, Context
6 5
7 6 from django_comments.forms import CommentForm
8 7 from django_comments.models import Comment
... ... @@ -10,15 +9,6 @@ from django_comments.models import Comment
10 9 from testapp.models import Article, Author
11 10 from . import CommentTestCase
12 11
13   -register = Library()
14   -
15   -
16   -@register.filter
17   -def noop(variable, param=None):
18   - return variable
19   -
20   -libraries['comment_testtags'] = register
21   -
22 12
23 13 class CommentTemplateTagTests(CommentTestCase):
24 14
... ...
Please register or login to post a comment