diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-11-26 22:46:31 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-11-26 22:46:31 +0000 |
| commit | 3ede006fc98f7e96ae9fb997872f78635576d5f8 (patch) | |
| tree | 291765d5f0fb31b7c9bde66d97c859f65f76b17a /tests/testapp | |
| parent | 5676d5b068909a699e798575e8a6a4492ff27af8 (diff) | |
Fixed #911 -- Made template system scoped to the parser instead of the template module. Also changed the way tags/filters are registered and added support for multiple arguments to {% load %} tag. Thanks, rjwittams. This is a backwards-incompatible change for people who've created custom template tags or filters. See http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/testapp')
| -rw-r--r-- | tests/testapp/templatetags/testtags.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/testapp/templatetags/testtags.py b/tests/testapp/templatetags/testtags.py index 7b755043fa..e9177d8c24 100644 --- a/tests/testapp/templatetags/testtags.py +++ b/tests/testapp/templatetags/testtags.py @@ -2,6 +2,8 @@ from django.core import template +register = template.Library() + class EchoNode(template.Node): def __init__(self, contents): self.contents = contents @@ -11,5 +13,5 @@ class EchoNode(template.Node): def do_echo(parser, token): return EchoNode(token.contents.split()[1:]) - -template.register_tag("echo", do_echo)
\ No newline at end of file + +register.tag("echo", do_echo)
\ No newline at end of file |
