Fixed template tag braces spacing.
This commit is contained in:
parent
119154ca7f
commit
e2868308bf
|
@ -32,7 +32,7 @@
|
||||||
{% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
|
{% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
|
||||||
<a href="{% add_preserved_filters history_url %}" class="historylink">{% trans "History" %}</a>
|
<a href="{% add_preserved_filters history_url %}" class="historylink">{% trans "History" %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% if has_absolute_url %}<li><a href="{{ absolute_url }}" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
|
{% if has_absolute_url %}<li><a href="{{ absolute_url }}" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}{% endif %}
|
{% endif %}{% endif %}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
|
{% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
|
||||||
<p class="deletelink-box"><a href="{% add_preserved_filters delete_url %}" class="deletelink">{% trans "Delete" %}</a></p>
|
<p class="deletelink-box"><a href="{% add_preserved_filters delete_url %}" class="deletelink">{% trans "Delete" %}</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" />{%endif%}
|
{% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" />{% endif %}
|
||||||
{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" />{% endif %}
|
{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" />{% endif %}
|
||||||
{% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" />{% endif %}
|
{% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" />{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -125,10 +125,10 @@ class FlatpageTemplateTagTests(TestCase):
|
||||||
self.assertRaises(TemplateSyntaxError, render,
|
self.assertRaises(TemplateSyntaxError, render,
|
||||||
"{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
|
"{% load flatpages %}{% get_flatpages cheesecake flatpages %}")
|
||||||
self.assertRaises(TemplateSyntaxError, render,
|
self.assertRaises(TemplateSyntaxError, render,
|
||||||
"{% load flatpages %}{% get_flatpages as flatpages asdf%}")
|
"{% load flatpages %}{% get_flatpages as flatpages asdf %}")
|
||||||
self.assertRaises(TemplateSyntaxError, render,
|
self.assertRaises(TemplateSyntaxError, render,
|
||||||
"{% load flatpages %}{% get_flatpages cheesecake user as flatpages %}")
|
"{% load flatpages %}{% get_flatpages cheesecake user as flatpages %}")
|
||||||
self.assertRaises(TemplateSyntaxError, render,
|
self.assertRaises(TemplateSyntaxError, render,
|
||||||
"{% load flatpages %}{% get_flatpages for user as flatpages asdf%}")
|
"{% load flatpages %}{% get_flatpages for user as flatpages asdf %}")
|
||||||
self.assertRaises(TemplateSyntaxError, render,
|
self.assertRaises(TemplateSyntaxError, render,
|
||||||
"{% load flatpages %}{% get_flatpages prefix for user as flatpages asdf%}")
|
"{% load flatpages %}{% get_flatpages prefix for user as flatpages asdf %}")
|
||||||
|
|
|
@ -2391,7 +2391,7 @@ Therefore here is our new ``change_form.html`` :
|
||||||
<li>
|
<li>
|
||||||
<a href="{% url 'admin:view_on_site' content_type_id original.pk %}" class="viewsitelink">{% trans "View on site" %}</a>
|
<a href="{% url 'admin:view_on_site' content_type_id original.pk %}" class="viewsitelink">{% trans "View on site" %}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif%}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
And that's it! If we placed this file in the ``templates/admin/my_app``
|
And that's it! If we placed this file in the ``templates/admin/my_app``
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{% extends "admin/base.html" %}
|
{% extends "admin/base.html" %}
|
||||||
|
|
||||||
{% block bodyclass%}bodyclass_consistency_check{% endblock %}
|
{% block bodyclass %}bodyclass_consistency_check{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue