Fix startdash and startpanel management commands
During startdash and startpanel commands execution Django loads base templates and tries to compile them. We need to use templatetag [1] to avoid this behaviour. As alternative solution we can use verbatim [2] block for it but it makes our base tamplets less readable, IMO. [1] https://docs.djangoproject.com/en/dev/ref/templates/builtins/#templatetag [2] https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std:templatetag-verbatim Change-Id: I1a489d4d4210e9c72d138cff9bfee664d424be20 Closes-Bug: #1796312
This commit is contained in:
parent
9d7620f76f
commit
b2219d5aa6
@ -1,11 +1,13 @@
|
||||
{% load horizon %}{% jstemplate %}[% extends 'base.html' %]
|
||||
{% templatetag openblock %} load horizon {% templatetag closeblock %}
|
||||
{% templatetag openblock %} jstemplate {% templatetag closeblock %}
|
||||
{% templatetag openblock %} extends 'base.html' {% templatetag closeblock %}
|
||||
|
||||
[% block sidebar %]
|
||||
[% include 'horizon/common/_sidebar.html' %]
|
||||
[% endblock %]
|
||||
{% templatetag openblock %} block sidebar {% templatetag closeblock %}
|
||||
{% templatetag openblock %} include 'horizon/common/_sidebar.html' {% templatetag closeblock %}
|
||||
{% templatetag openblock %} endblock {% templatetag closeblock %}
|
||||
|
||||
[% block main %]
|
||||
[% include "horizon/_messages.html" %]
|
||||
[% block {{ dash_name }}_main %][% endblock %]
|
||||
[% endblock %]
|
||||
{% endjstemplate %}
|
||||
{% templatetag openblock %} block main {% templatetag closeblock %}
|
||||
{% templatetag openblock %} include "horizon/_messages.html" {% templatetag closeblock %}
|
||||
{% templatetag openblock %} block {{ dash_name }}_main {% templatetag closeblock %}{% templatetag openblock %} endblock {% templatetag closeblock %}
|
||||
{% templatetag openblock %} endblock {% templatetag closeblock %}
|
||||
{% templatetag openblock %} endjstemplate {% templatetag closeblock %}
|
||||
|
@ -1,12 +1,17 @@
|
||||
{% load horizon %}{% jstemplate %}[% extends 'base.html' %]
|
||||
[% load i18n %]
|
||||
[% block title %][% trans "{{ panel_name|title }}" %][% endblock %]
|
||||
{% templatetag openblock %} load horizon {% templatetag closeblock %}
|
||||
{% templatetag openblock %} jstemplate {% templatetag closeblock %}
|
||||
{% templatetag openblock %} extends 'base.html' {% templatetag closeblock %}
|
||||
|
||||
[% block page_header %]
|
||||
[% include "horizon/common/_page_header.html" with title=_("{{ panel_name|title }}") %]
|
||||
[% endblock page_header %]
|
||||
{% templatetag openblock %} load i18n {% templatetag closeblock %}
|
||||
{% templatetag openblock %} block title {% templatetag closeblock %}
|
||||
{% templatetag openblock %} trans "{{ panel_name|title }}" {% templatetag closeblock %}
|
||||
{% templatetag openblock %} endblock {% templatetag closeblock %}
|
||||
|
||||
[% block main %]
|
||||
[% endblock %]
|
||||
{% templatetag openblock %} block page_header {% templatetag closeblock %}
|
||||
{% templatetag openblock %} include "horizon/common/_page_header.html" with title=_("{{ panel_name|title }}") {% templatetag closeblock %}
|
||||
{% templatetag openblock %} endblock page_header {% templatetag closeblock %}
|
||||
|
||||
{% endjstemplate %}
|
||||
{% templatetag openblock %} block main {% templatetag closeblock %}
|
||||
{% templatetag openblock %} endblock {% templatetag closeblock %}
|
||||
|
||||
{% templatetag openblock %} endjstemplate {% templatetag closeblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user