mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #10094 -- Fixed the include and extends template tags to work with filenames with spaces, patch from mcroydon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -158,7 +158,7 @@ def do_extends(parser, token):
|
||||
name of the parent template to extend (if it evaluates to a string) or as
|
||||
the parent tempate itelf (if it evaluates to a Template object).
|
||||
"""
|
||||
bits = token.contents.split()
|
||||
bits = token.split_contents()
|
||||
if len(bits) != 2:
|
||||
raise TemplateSyntaxError, "'%s' takes one argument" % bits[0]
|
||||
parent_name, parent_name_expr = None, None
|
||||
@@ -179,7 +179,7 @@ def do_include(parser, token):
|
||||
|
||||
{% include "foo/some_include" %}
|
||||
"""
|
||||
bits = token.contents.split()
|
||||
bits = token.split_contents()
|
||||
if len(bits) != 2:
|
||||
raise TemplateSyntaxError, "%r tag takes one argument: the name of the template to be included" % bits[0]
|
||||
path = bits[1]
|
||||
|
||||
Reference in New Issue
Block a user