Commit 2f7564441ea17148b97a28036f71792682eba61d
1 parent
29763a5f
Moved test tag library to templatetags dir
Dynamic library registration is harder to do to keep backwards compatibility.
Showing
3 changed files
with
9 additions
and
11 deletions
tests/testapp/templatetags/__init__.py
0 → 100644
| 1 | from __future__ import absolute_import | 1 | from __future__ import absolute_import |
| 2 | 2 | ||
| 3 | from django.contrib.contenttypes.models import ContentType | 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 | from django_comments.forms import CommentForm | 6 | from django_comments.forms import CommentForm |
| 8 | from django_comments.models import Comment | 7 | from django_comments.models import Comment |
| @@ -10,15 +9,6 @@ from django_comments.models import Comment | @@ -10,15 +9,6 @@ from django_comments.models import Comment | ||
| 10 | from testapp.models import Article, Author | 9 | from testapp.models import Article, Author |
| 11 | from . import CommentTestCase | 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 | class CommentTemplateTagTests(CommentTestCase): | 13 | class CommentTemplateTagTests(CommentTestCase): |
| 24 | 14 |
Please
register
or
login
to post a comment