mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +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:
parent
9ac3905f01
commit
86c5142461
2 changed files with 10 additions and 2 deletions
|
@ -661,6 +661,8 @@ class Templates(unittest.TestCase):
|
|||
'include02': ('{% include "basic-syntax02" %}', {'headline': 'Included'}, "Included"),
|
||||
'include03': ('{% include template_name %}', {'template_name': 'basic-syntax02', 'headline': 'Included'}, "Included"),
|
||||
'include04': ('a{% include "nonexistent" %}b', {}, "ab"),
|
||||
'include 05': ('template with a space', {}, 'template with a space'),
|
||||
'include06': ('{% include "include 05"%}', {}, 'template with a space'),
|
||||
|
||||
### NAMED ENDBLOCKS #######################################################
|
||||
|
||||
|
@ -760,6 +762,12 @@ class Templates(unittest.TestCase):
|
|||
# Inheritance from a template that doesn't have any blocks
|
||||
'inheritance27': ("{% extends 'inheritance26' %}", {}, 'no tags'),
|
||||
|
||||
# Set up a base template with a space in it.
|
||||
'inheritance 28': ("{% block first %}!{% endblock %}", {}, '!'),
|
||||
|
||||
# Inheritance from a template with a space in its name should work.
|
||||
'inheritance29': ("{% extends 'inheritance 28' %}", {}, '!'),
|
||||
|
||||
### I18N ##################################################################
|
||||
|
||||
# {% spaceless %} tag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue