diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py
index 38b2fff..f91699d 100644
|
a
|
b
|
def do_extends(parser, token):
|
| 158 | 158 | name of the parent template to extend (if it evaluates to a string) or as |
| 159 | 159 | the parent tempate itelf (if it evaluates to a Template object). |
| 160 | 160 | """ |
| 161 | | bits = token.contents.split() |
| | 161 | bits = token.split_contents() |
| 162 | 162 | if len(bits) != 2: |
| 163 | 163 | raise TemplateSyntaxError, "'%s' takes one argument" % bits[0] |
| 164 | 164 | parent_name, parent_name_expr = None, None |
| … |
… |
def do_include(parser, token):
|
| 179 | 179 | |
| 180 | 180 | {% include "foo/some_include" %} |
| 181 | 181 | """ |
| 182 | | bits = token.contents.split() |
| | 182 | bits = token.split_contents() |
| 183 | 183 | if len(bits) != 2: |
| 184 | 184 | raise TemplateSyntaxError, "%r tag takes one argument: the name of the template to be included" % bits[0] |
| 185 | 185 | path = bits[1] |
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index f0eee52..5419c18 100644
|
a
|
b
|
class Templates(unittest.TestCase):
|
| 658 | 658 | 'include02': ('{% include "basic-syntax02" %}', {'headline': 'Included'}, "Included"), |
| 659 | 659 | 'include03': ('{% include template_name %}', {'template_name': 'basic-syntax02', 'headline': 'Included'}, "Included"), |
| 660 | 660 | 'include04': ('a{% include "nonexistent" %}b', {}, "ab"), |
| | 661 | 'include 05': ('template with a space', {}, 'template with a space'), |
| | 662 | 'include06': ('{% include "include 05"%}', {}, 'template with a space'), |
| 661 | 663 | |
| 662 | 664 | ### NAMED ENDBLOCKS ####################################################### |
| 663 | 665 | |
| … |
… |
class Templates(unittest.TestCase):
|
| 757 | 759 | # Inheritance from a template that doesn't have any blocks |
| 758 | 760 | 'inheritance27': ("{% extends 'inheritance26' %}", {}, 'no tags'), |
| 759 | 761 | |
| | 762 | # Set up a base template with a space in it |
| | 763 | 'inheritance 28': ("{% block first %}!{% endblock %}", {}, '!'), |
| | 764 | |
| | 765 | # Inheritance from a template with a space in its name should work |
| | 766 | 'inheritance29': ("{% extends 'inheritance 28' %}", {}, '!'), |
| | 767 | |
| 760 | 768 | ### I18N ################################################################## |
| 761 | 769 | |
| 762 | 770 | # {% spaceless %} tag |