Index: django/template/__init__.py
===================================================================
--- django/template/__init__.py	(revision 14358)
+++ django/template/__init__.py	(working copy)
@@ -848,18 +848,23 @@
             return ''
         return _render_value_in_context(output, context)
 
-def generic_tag_compiler(params, defaults, name, node_class, parser, token):
+def generic_tag_compiler(params, defaults, name, node_class, parser, token, varargs=None):
     "Returns a template.Node subclass."
     bits = token.split_contents()[1:]
     bmax = len(params)
     def_len = defaults and len(defaults) or 0
     bmin = bmax - def_len
-    if(len(bits) < bmin or len(bits) > bmax):
-        if bmin == bmax:
-            message = "%s takes %s arguments" % (name, bmin)
-        else:
-            message = "%s takes between %s and %s arguments" % (name, bmin, bmax)
-        raise TemplateSyntaxError(message)
+    if varargs is None:
+        if(len(bits) < bmin or len(bits) > bmax):
+            if bmin == bmax:
+                message = "%s takes %s arguments" % (name, bmin)
+            else:
+                message = "%s takes between %s and %s arguments" % (name, bmin, bmax)
+            raise TemplateSyntaxError(message)
+    else:
+        if(len(bits) < bmin):
+            message = "%s takes at least %s arguments" % (name, bmin)
+            raise TemplateSyntaxError(message)
     return node_class(bits)
 
 class Library(object):
@@ -916,7 +921,7 @@
         return func
 
     def simple_tag(self,func):
-        params, xx, xxx, defaults = getargspec(func)
+        params, varargs, xx, defaults = getargspec(func)
 
         class SimpleNode(Node):
             def __init__(self, vars_to_resolve):
@@ -926,14 +931,14 @@
                 resolved_vars = [var.resolve(context) for var in self.vars_to_resolve]
                 return func(*resolved_vars)
 
-        compile_func = curry(generic_tag_compiler, params, defaults, getattr(func, "_decorated_function", func).__name__, SimpleNode)
+        compile_func = curry(generic_tag_compiler, params, defaults, getattr(func, "_decorated_function", func).__name__, SimpleNode, varargs=varargs)
         compile_func.__doc__ = func.__doc__
         self.tag(getattr(func, "_decorated_function", func).__name__, compile_func)
         return func
 
     def inclusion_tag(self, file_name, context_class=Context, takes_context=False):
         def dec(func):
-            params, xx, xxx, defaults = getargspec(func)
+            params, varargs, xx, defaults = getargspec(func)
             if takes_context:
                 if params[0] == 'context':
                     params = params[1:]
@@ -968,8 +973,7 @@
                     if csrf_token is not None:
                         new_context['csrf_token'] = csrf_token
                     return self.nodelist.render(new_context)
-
-            compile_func = curry(generic_tag_compiler, params, defaults, getattr(func, "_decorated_function", func).__name__, InclusionNode)
+            compile_func = curry(generic_tag_compiler, params, defaults, getattr(func, "_decorated_function", func).__name__, InclusionNode, varargs=varargs)
             compile_func.__doc__ = func.__doc__
             self.tag(getattr(func, "_decorated_function", func).__name__, compile_func)
             return func
Index: tests/regressiontests/templates/tests.py
===================================================================
--- tests/regressiontests/templates/tests.py	(revision 14358)
+++ tests/regressiontests/templates/tests.py	(working copy)
@@ -1350,6 +1350,56 @@
             # Escape requirement survives lookup.
             'autoescape-lookup01': ('{{ var.key }}', { "var": {"key": "this & that" }}, "this &amp; that" ),
 
+
+            ### SIMPLE TAGS ######################################################
+            'simpletags01': ('{% load custom %}{% simple_tag_with_three_arguments "one" "two" "three" %}', {}, 'one, two, three'),
+            'simpletags02': ('{% load custom %}{% simple_tag_with_three_arguments one two three %}', {'one': '1', 'two': '2', 'three': '3'}, '1, 2, 3'),
+
+            # Default arguments
+            'simpletags-default01': ('{% load custom %}{% simple_tag_with_two_default_arguments "one" "two" "three" %}', {}, 'one, two, three'),
+            'simpletags-default02': ('{% load custom %}{% simple_tag_with_two_default_arguments one three %}', {'one': '1', 'two': '2', 'three': '3'}, '1, 3, 3'),
+            'simpletags-default03': ('{% load custom %}{% simple_tag_with_two_default_arguments one %}', {'one': 'first'}, 'first, 2, 3'),
+
+            # Unlimited arguments
+            'simpletags-unlimited01': ('{% load custom %}{% simple_tag_with_unlimited_arguments "one" "two" "three" %}', {}, 'one, two, three'),
+            'simpletags-unlimited02': ('{% load custom %}{% simple_tag_with_unlimited_arguments "one" %}', {}, 'one, 2'),
+            'simpletags-unlimited03': ('{% load custom %}{% simple_tag_with_unlimited_arguments one two three four five %}', {'one': '1', 'two': '2', 'three': '3', 'four': '4', 'five': '5'}, '1, 2, 3, 4, 5'),
+            'simpletags-unlimited04': ('{% load custom %}{% simple_tag_with_unlimited_arguments one %}', {'one': 'first'}, 'first, 2'),
+            'simpletags-unlimited05': ('{% load custom %}{% simple_tag_with_only_unlimited_arguments one %}', {'one': 'first'}, 'first'),
+            'simpletags-unlimited06': ('{% load custom %}{% simple_tag_with_only_unlimited_arguments %}', {}, ''),
+            'simpletags-unlimited07': ('{% load custom %}{% simple_tag_with_only_unlimited_arguments "one" "2" "3" %}', {}, 'one, 2, 3'),
+
+            # Failures
+            'simpletags-fail01': ('{% load custom %}{% simple_tag_with_three_arguments "one" "three" %}', {}, template.TemplateSyntaxError),
+            'simpletags-fail02': ('{% load custom %}{% simple_tag_with_three_arguments "one" "two" "three" "four" %}', {}, template.TemplateSyntaxError),
+            'simpletags-fail03': ('{% load custom %}{% simple_tag_with_two_default_arguments %}', {}, template.TemplateSyntaxError),
+            'simpletags-fail04': ('{% load custom %}{% simple_tag_with_two_default_arguments "one" "two" "three" "four" %}', {}, template.TemplateSyntaxError),
+            'simpletags-fail05': ('{% load custom %}{% simple_tag_with_unlimited_arguments %}', {}, template.TemplateSyntaxError),
+
+
+
+            ### INCLUSION TAGS ######################################################
+            'inclusiontags01': ('{% load custom %}{% inclusion_tag_with_two_arguments "1" "2" %}', {}, "1 --- 2"),
+            'inclusiontags02': ('{% load custom %}{% inclusion_tag_with_two_arguments "1" two %}', {'two': '2'}, "1 --- 2"),
+
+            # Default arguments
+            'inclusiontags-default01': ('{% load custom %}{% inclusion_tag_with_one_default_argument "1" "2" %}', {}, "1 --- 2"),
+            'inclusiontags-default02': ('{% load custom %}{% inclusion_tag_with_one_default_argument one %}', {'one': "1"}, "1 --- hi"),
+
+            # Unlimited arguments
+            'inclusiontags-unlimited01': ('{% load custom %}{% inclusion_tag_with_unlimited_arguments "1" "2" %}', {}, "12"),
+            'inclusiontags-unlimited02': ('{% load custom %}{% inclusion_tag_with_unlimited_arguments one %}', {'one': 'first'}, "firsthi"),
+            'inclusiontags-unlimited03': ('{% load custom %}{% inclusion_tag_with_unlimited_arguments "1" "2" "3" "5" "7" %}', {}, "12357"),
+            'inclusiontags-unlimited04': ('{% load custom %}{% inclusion_tag_with_only_unlimited_arguments %}', {}, ""),
+            'inclusiontags-unlimited05': ('{% load custom %}{% inclusion_tag_with_only_unlimited_arguments "1" "2" "3" "5" hello %}', {'hello': 'hello'}, "1235hello"),
+
+            # Failures
+            'inclusiontags-fail01': ('{% load custom %}{% inclusion_tag_with_two_arguments "1" %}', {}, template.TemplateSyntaxError),
+            'inclusiontags-fail02': ('{% load custom %}{% inclusion_tag_with_two_arguments "1" two "3" %}', {'two': '2'}, template.TemplateSyntaxError),
+            'inclusiontags-fail03': ('{% load custom %}{% inclusion_tag_with_one_default_argument %}', {}, template.TemplateSyntaxError),
+            'inclusiontags-fail04': ('{% load custom %}{% inclusion_tag_with_one_default_argument "1" two "3" %}', {'two': '2'}, template.TemplateSyntaxError),
+            'inclusiontags-fail05': ('{% load custom %}{% inclusion_tag_with_unlimited_arguments %}', {}, template.TemplateSyntaxError),
+
         }
 
 
Index: tests/regressiontests/templates/templatetags/custom.py
===================================================================
--- tests/regressiontests/templates/templatetags/custom.py	(revision 14358)
+++ tests/regressiontests/templates/templatetags/custom.py	(working copy)
@@ -9,3 +9,60 @@
 
 register.filter(trim)
 
+
+def simple_tag_with_three_arguments(one, two, three):
+    return ', '.join((one, two, three))
+
+register.simple_tag(simple_tag_with_three_arguments)
+
+
+def simple_tag_with_two_default_arguments(one, two='2', three='3'):
+    return ', '.join((one, two, three))
+
+register.simple_tag(simple_tag_with_two_default_arguments)
+
+
+def simple_tag_with_unlimited_arguments(one, two='2', *args):
+    return ', '.join([one, two] + list(args))
+
+register.simple_tag(simple_tag_with_unlimited_arguments)
+
+
+def simple_tag_with_only_unlimited_arguments(*args):
+	return ', '.join(args)
+
+register.simple_tag(simple_tag_with_only_unlimited_arguments)
+
+
+def inclusion_tag_with_two_arguments(one, two):
+    return {
+        'first': one,
+        'second': two
+    }
+
+register.inclusion_tag('basic-syntax03')(inclusion_tag_with_two_arguments)
+
+
+def inclusion_tag_with_one_default_argument(one, two='hi'):
+    return {
+        'first': one,
+        'second': two
+    }
+
+register.inclusion_tag('basic-syntax03')(inclusion_tag_with_one_default_argument)
+
+
+def inclusion_tag_with_unlimited_arguments(one, two='hi', *args):
+    return {
+        'values': [one, two] + list(args)
+    }
+
+register.inclusion_tag('for-tag01')(inclusion_tag_with_unlimited_arguments)
+
+
+def inclusion_tag_with_only_unlimited_arguments(*args):
+    return {
+        'values': args
+    }
+
+register.inclusion_tag('for-tag01')(inclusion_tag_with_only_unlimited_arguments)
\ No newline at end of file
