diff --git a/django/template/__init__.py b/django/template/__init__.py
index 5493e5b..14eea5c 100644
a
|
b
|
class VariableNode(Node):
|
830 | 830 | return '' |
831 | 831 | return _render_value_in_context(output, context) |
832 | 832 | |
833 | | def generic_tag_compiler(params, defaults, name, node_class, parser, token): |
834 | | "Returns a template.Node subclass." |
835 | | bits = token.split_contents()[1:] |
| 833 | def match_number_of_arguments(bits, params, defaults, name): |
836 | 834 | bmax = len(params) |
837 | 835 | def_len = defaults and len(defaults) or 0 |
838 | 836 | bmin = bmax - def_len |
… |
… |
def generic_tag_compiler(params, defaults, name, node_class, parser, token):
|
842 | 840 | else: |
843 | 841 | message = "%s takes between %s and %s arguments" % (name, bmin, bmax) |
844 | 842 | raise TemplateSyntaxError(message) |
| 843 | |
| 844 | def generic_tag_compiler(params, defaults, name, node_class, parser, token): |
| 845 | "Returns a template.Node subclass." |
| 846 | bits = token.split_contents()[1:] |
| 847 | match_number_of_arguments(bits, params, defaults, name) |
845 | 848 | return node_class(bits) |
846 | 849 | |
847 | 850 | class Library(object): |