Loading django/contrib/admin/templates/admin/pagination.html +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ {% paginator_number cl i %} {% endfor %} {% endif %} {{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %} {{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %} {% if show_all_url %} <a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %} {% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% trans 'Save' %}"/>{% endif %} </p> django/contrib/admin/templates/admin/search_form.html +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ <span class="small quiet">{% blocktrans count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktrans with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktrans %}{% else %}{% trans "Show all" %}{% endif %}</a>)</span> {% endif %} {% for pair in cl.params.items %} {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %} {% if pair.0 != search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endif %} {% endfor %} </div> </form></div> Loading django/views/debug.py +7 −7 Original line number Diff line number Diff line Loading @@ -747,9 +747,9 @@ TECHNICAL_500_TEMPLATE = (""" <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p> <h3>{{ template_info.message }}</h3> <table class="source{% if template_info.top %} cut-top{% endif %} {% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}"> {% if template_info.bottom != template_info.total %} cut-bottom{% endif %}"> {% for source_line in template_info.source_lines %} {% ifequal source_line.0 template_info.line %} {% if source_line.0 == template_info.line %} <tr class="error"><th>{{ source_line.0 }}</th> <td>{{ template_info.before }}""" """<span class="specific">{{ template_info.during }}</span>""" Loading @@ -758,7 +758,7 @@ TECHNICAL_500_TEMPLATE = (""" {% else %} <tr><th>{{ source_line.0 }}</th> <td>{{ source_line.1 }}</td></tr> {% endifequal %} {% endif %} {% endfor %} </table> </div> Loading Loading @@ -872,11 +872,11 @@ Template error: In template {{ template_info.name }}, error at line {{ template_info.line }} {{ template_info.message }}""" "{% for source_line in template_info.source_lines %}" "{% ifequal source_line.0 template_info.line %}" "{% if source_line.0 == template_info.line %}" " {{ source_line.0 }} : {{ template_info.before }} {{ template_info.during }} {{ template_info.after }}" "{% else %}" " {{ source_line.0 }} : {{ source_line.1 }}" """{% endifequal %}{% endfor %}{% endif %} """{% endif %}{% endfor %}{% endif %} Traceback:{% for frame in frames %} {% ifchanged frame.exc_cause %}{% if frame.exc_cause %}{% if frame.exc_cause_explicit %} Loading Loading @@ -1072,11 +1072,11 @@ Template error: In template {{ template_info.name }}, error at line {{ template_info.line }} {{ template_info.message }} {% for source_line in template_info.source_lines %}""" "{% ifequal source_line.0 template_info.line %}" "{% if source_line.0 == template_info.line %}" " {{ source_line.0 }} : {{ template_info.before }} {{ template_info.during }} {{ template_info.after }}" "{% else %}" " {{ source_line.0 }} : {{ source_line.1 }}" """{% endifequal %}{% endfor %}{% endif %}{% if frames %} """{% endif %}{% endfor %}{% endif %}{% if frames %} Traceback:""" "{% for frame in frames %}" Loading django/views/static.py +2 −2 Original line number Diff line number Diff line Loading @@ -87,9 +87,9 @@ DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ <body> <h1>{% blocktrans %}Index of {{ directory }}{% endblocktrans %}</h1> <ul> {% ifnotequal directory "/" %} {% if directory != "/" %} <li><a href="../">../</a></li> {% endifnotequal %} {% endif %} {% for f in file_list %} <li><a href="{{ f|urlencode }}">{{ f }}</a></li> {% endfor %} Loading tests/template_tests/syntax_tests/test_extends.py +4 −4 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ inheritance_templates = { 'inheritance30': "1{% if optional %}{% block opt %}2{% endblock %}{% endif %}3", 'inheritance31': "{% extends 'inheritance30' %}{% block opt %}two{% endblock %}", 'inheritance32': "{% extends 'inheritance30' %}{% block opt %}two{% endblock %}", 'inheritance33': "1{% ifequal optional 1 %}{% block opt %}2{% endblock %}{% endifequal %}3", 'inheritance33': "1{% if optional == 1 %}{% block opt %}2{% endblock %}{% endif %}3", 'inheritance34': "{% extends 'inheritance33' %}{% block opt %}two{% endblock %}", 'inheritance35': "{% extends 'inheritance33' %}{% block opt %}two{% endblock %}", 'inheritance36': "{% for n in numbers %}_{% block opt %}{{ n }}{% endblock %}{% endfor %}_", Loading Loading @@ -322,7 +322,7 @@ class InheritanceTests(SimpleTestCase): @setup(inheritance_templates) def test_inheritance33(self): """ Base template, putting block in a conditional {% ifequal %} tag Base template, putting block in a conditional {% if %} tag """ output = self.engine.render_to_string('inheritance33', {'optional': 1}) self.assertEqual(output, '123') Loading @@ -330,7 +330,7 @@ class InheritanceTests(SimpleTestCase): @setup(inheritance_templates) def test_inheritance34(self): """ Inherit from a template with block wrapped in an {% ifequal %} tag Inherit from a template with block wrapped in an {% if %} tag (in parent), still gets overridden """ output = self.engine.render_to_string('inheritance34', {'optional': 1}) Loading @@ -339,7 +339,7 @@ class InheritanceTests(SimpleTestCase): @setup(inheritance_templates) def test_inheritance35(self): """ Inherit from a template with block wrapped in an {% ifequal %} tag Inherit from a template with block wrapped in an {% if %} tag (in parent), still gets overridden """ output = self.engine.render_to_string('inheritance35', {'optional': 2}) Loading Loading
django/contrib/admin/templates/admin/pagination.html +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ {% paginator_number cl i %} {% endfor %} {% endif %} {{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %} {{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %} {% if show_all_url %} <a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %} {% if cl.formset and cl.result_count %}<input type="submit" name="_save" class="default" value="{% trans 'Save' %}"/>{% endif %} </p>
django/contrib/admin/templates/admin/search_form.html +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ <span class="small quiet">{% blocktrans count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktrans with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktrans %}{% else %}{% trans "Show all" %}{% endif %}</a>)</span> {% endif %} {% for pair in cl.params.items %} {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %} {% if pair.0 != search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endif %} {% endfor %} </div> </form></div> Loading
django/views/debug.py +7 −7 Original line number Diff line number Diff line Loading @@ -747,9 +747,9 @@ TECHNICAL_500_TEMPLATE = (""" <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p> <h3>{{ template_info.message }}</h3> <table class="source{% if template_info.top %} cut-top{% endif %} {% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}"> {% if template_info.bottom != template_info.total %} cut-bottom{% endif %}"> {% for source_line in template_info.source_lines %} {% ifequal source_line.0 template_info.line %} {% if source_line.0 == template_info.line %} <tr class="error"><th>{{ source_line.0 }}</th> <td>{{ template_info.before }}""" """<span class="specific">{{ template_info.during }}</span>""" Loading @@ -758,7 +758,7 @@ TECHNICAL_500_TEMPLATE = (""" {% else %} <tr><th>{{ source_line.0 }}</th> <td>{{ source_line.1 }}</td></tr> {% endifequal %} {% endif %} {% endfor %} </table> </div> Loading Loading @@ -872,11 +872,11 @@ Template error: In template {{ template_info.name }}, error at line {{ template_info.line }} {{ template_info.message }}""" "{% for source_line in template_info.source_lines %}" "{% ifequal source_line.0 template_info.line %}" "{% if source_line.0 == template_info.line %}" " {{ source_line.0 }} : {{ template_info.before }} {{ template_info.during }} {{ template_info.after }}" "{% else %}" " {{ source_line.0 }} : {{ source_line.1 }}" """{% endifequal %}{% endfor %}{% endif %} """{% endif %}{% endfor %}{% endif %} Traceback:{% for frame in frames %} {% ifchanged frame.exc_cause %}{% if frame.exc_cause %}{% if frame.exc_cause_explicit %} Loading Loading @@ -1072,11 +1072,11 @@ Template error: In template {{ template_info.name }}, error at line {{ template_info.line }} {{ template_info.message }} {% for source_line in template_info.source_lines %}""" "{% ifequal source_line.0 template_info.line %}" "{% if source_line.0 == template_info.line %}" " {{ source_line.0 }} : {{ template_info.before }} {{ template_info.during }} {{ template_info.after }}" "{% else %}" " {{ source_line.0 }} : {{ source_line.1 }}" """{% endifequal %}{% endfor %}{% endif %}{% if frames %} """{% endif %}{% endfor %}{% endif %}{% if frames %} Traceback:""" "{% for frame in frames %}" Loading
django/views/static.py +2 −2 Original line number Diff line number Diff line Loading @@ -87,9 +87,9 @@ DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ <body> <h1>{% blocktrans %}Index of {{ directory }}{% endblocktrans %}</h1> <ul> {% ifnotequal directory "/" %} {% if directory != "/" %} <li><a href="../">../</a></li> {% endifnotequal %} {% endif %} {% for f in file_list %} <li><a href="{{ f|urlencode }}">{{ f }}</a></li> {% endfor %} Loading
tests/template_tests/syntax_tests/test_extends.py +4 −4 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ inheritance_templates = { 'inheritance30': "1{% if optional %}{% block opt %}2{% endblock %}{% endif %}3", 'inheritance31': "{% extends 'inheritance30' %}{% block opt %}two{% endblock %}", 'inheritance32': "{% extends 'inheritance30' %}{% block opt %}two{% endblock %}", 'inheritance33': "1{% ifequal optional 1 %}{% block opt %}2{% endblock %}{% endifequal %}3", 'inheritance33': "1{% if optional == 1 %}{% block opt %}2{% endblock %}{% endif %}3", 'inheritance34': "{% extends 'inheritance33' %}{% block opt %}two{% endblock %}", 'inheritance35': "{% extends 'inheritance33' %}{% block opt %}two{% endblock %}", 'inheritance36': "{% for n in numbers %}_{% block opt %}{{ n }}{% endblock %}{% endfor %}_", Loading Loading @@ -322,7 +322,7 @@ class InheritanceTests(SimpleTestCase): @setup(inheritance_templates) def test_inheritance33(self): """ Base template, putting block in a conditional {% ifequal %} tag Base template, putting block in a conditional {% if %} tag """ output = self.engine.render_to_string('inheritance33', {'optional': 1}) self.assertEqual(output, '123') Loading @@ -330,7 +330,7 @@ class InheritanceTests(SimpleTestCase): @setup(inheritance_templates) def test_inheritance34(self): """ Inherit from a template with block wrapped in an {% ifequal %} tag Inherit from a template with block wrapped in an {% if %} tag (in parent), still gets overridden """ output = self.engine.render_to_string('inheritance34', {'optional': 1}) Loading @@ -339,7 +339,7 @@ class InheritanceTests(SimpleTestCase): @setup(inheritance_templates) def test_inheritance35(self): """ Inherit from a template with block wrapped in an {% ifequal %} tag Inherit from a template with block wrapped in an {% if %} tag (in parent), still gets overridden """ output = self.engine.render_to_string('inheritance35', {'optional': 2}) Loading