From 31f7f50ff1fe569eb8537b03b58d235a0e3ff1af Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 19 Jan 2015 20:58:15 +0100 Subject: [PATCH] Unify the syntax used for the {% ... %} delimter in Jinja2 templates According to the Jinja2 documentation the preferred usage for the syntax of the {% ... %} delimter is {% ... %}. This patch changes all occurcens of {%... and ...%} to {% ... %}. Change-Id: I49243a16b71237bea47bc29f11508e16e77e3621 --- horizon/templates/horizon/common/_data_table_cell.html | 4 ++-- .../horizon/common/_data_table_row_actions_dropdown.html | 4 ++-- horizon/templates/horizon/common/_formset_table_row.html | 2 +- horizon/templates/horizon/common/_limit_summary.html | 2 +- .../access_and_security/security_groups/_update.html | 2 +- .../templates/data_processing.job_executions/_details.html | 2 +- .../databases/templates/databases/_launch_network_help.html | 2 +- .../firewalls/templates/firewalls/_firewall_details.html | 2 +- .../instances/templates/instances/_decryptpassword.html | 2 +- .../instances/templates/instances/_detail_overview.html | 2 +- .../network_topology/templates/network_topology/iframe.html | 2 +- .../network_topology/templates/network_topology/index.html | 4 ++-- .../project/stacks/templates/stacks/_change_template.html | 2 +- .../volumes/templates/volumes/volumes/_detail_overview.html | 2 +- .../project/volumes/templates/volumes/volumes/_extend.html | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/horizon/templates/horizon/common/_data_table_cell.html b/horizon/templates/horizon/common/_data_table_cell.html index bbcb98e3c8..bd573eda35 100644 --- a/horizon/templates/horizon/common/_data_table_cell.html +++ b/horizon/templates/horizon/common/_data_table_cell.html @@ -25,7 +25,7 @@
- {%if cell.wrap_list %}
    {% endif %}{{ cell.value }}{%if cell.wrap_list %}
{% endif %} + {% if cell.wrap_list %}
    {% endif %}{{ cell.value }}{% if cell.wrap_list %}
{% endif %}
@@ -34,6 +34,6 @@
{% else %} - {%if cell.wrap_list %}
    {% endif %}{{ cell.value }}{%if cell.wrap_list %}
{% endif %} + {% if cell.wrap_list %}
    {% endif %}{{ cell.value }}{% if cell.wrap_list %}
{% endif %} {% endif %} {% endif %} diff --git a/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html b/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html index 0e2e11e554..c63929fe36 100644 --- a/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html +++ b/horizon/templates/horizon/common/_data_table_row_actions_dropdown.html @@ -21,7 +21,7 @@ {% endfor %}
{% endif %} -{% if row_actions|length == 1%} - {% include "horizon/common/_data_table_row_action_dropdown.html" with action=row_actions.0%} +{% if row_actions|length == 1 %} + {% include "horizon/common/_data_table_row_action_dropdown.html" with action=row_actions.0 %} {% endif %} {% endspaceless %} diff --git a/horizon/templates/horizon/common/_formset_table_row.html b/horizon/templates/horizon/common/_formset_table_row.html index 40b095218a..f5c4dfcf1a 100644 --- a/horizon/templates/horizon/common/_formset_table_row.html +++ b/horizon/templates/horizon/common/_formset_table_row.html @@ -5,7 +5,7 @@ {% if cell.field %} {{ cell.field }} {% else %} - {%if cell.wrap_list %}{% endif %} + {% if cell.wrap_list %}{% endif %} {% endif %} {% if forloop.first %} {% for field in row.form.hidden_fields %} diff --git a/horizon/templates/horizon/common/_limit_summary.html b/horizon/templates/horizon/common/_limit_summary.html index 9a9be64fd1..93f5d6d494 100644 --- a/horizon/templates/horizon/common/_limit_summary.html +++ b/horizon/templates/horizon/common/_limit_summary.html @@ -33,7 +33,7 @@
{% trans "Security Groups" %}
- {% blocktrans with used=usage.limits.totalSecurityGroupsUsed|intcomma available=usage.limits.maxSecurityGroups|quotainf|intcomma%}Used {{ used }} of {{ available }} {% endblocktrans %} + {% blocktrans with used=usage.limits.totalSecurityGroupsUsed|intcomma available=usage.limits.maxSecurityGroups|quotainf|intcomma %}Used {{ used }} of {{ available }} {% endblocktrans %}
{% if usage.limits.totalVolumesUsed >= 0 %} diff --git a/openstack_dashboard/dashboards/project/access_and_security/templates/access_and_security/security_groups/_update.html b/openstack_dashboard/dashboards/project/access_and_security/templates/access_and_security/security_groups/_update.html index 30c289eb75..da5309d222 100644 --- a/openstack_dashboard/dashboards/project/access_and_security/templates/access_and_security/security_groups/_update.html +++ b/openstack_dashboard/dashboards/project/access_and_security/templates/access_and_security/security_groups/_update.html @@ -3,7 +3,7 @@ {% load url from future %} {% block form_id %}update_security_group_form{% endblock %} -{% block form_action %}{% url 'horizon:project:access_and_security:security_groups:update' security_group.id%}{% endblock %} +{% block form_action %}{% url 'horizon:project:access_and_security:security_groups:update' security_group.id %}{% endblock %} {% block modal-header %}{% trans "Edit Security Group" %}{% endblock %} {% block modal_id %}update_security_group_modal{% endblock %} diff --git a/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/_details.html b/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/_details.html index 525a450c73..81d7f4765a 100644 --- a/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/_details.html +++ b/openstack_dashboard/dashboards/project/data_processing/job_executions/templates/data_processing.job_executions/_details.html @@ -30,7 +30,7 @@
{% trans "Job Configuration" %}
{% for group, vals in job_execution.job_configs.iteritems %}
  • {% blocktrans %}{{ group }}:{% endblocktrans %} - {%if group == "args" %} + {% if group == "args" %}
      {% for val in vals %}
    • {{ val }}
    • {% endfor %}
    {% else %}
      {% for key, val in vals.iteritems %}
    • {{ key }} = {{ val }}
    • {% endfor %}
    diff --git a/openstack_dashboard/dashboards/project/databases/templates/databases/_launch_network_help.html b/openstack_dashboard/dashboards/project/databases/templates/databases/_launch_network_help.html index afbdbc35aa..03bd86054d 100644 --- a/openstack_dashboard/dashboards/project/databases/templates/databases/_launch_network_help.html +++ b/openstack_dashboard/dashboards/project/databases/templates/databases/_launch_network_help.html @@ -5,5 +5,5 @@ Move networks from 'Available Networks' to 'Selected Networks' by clicking the button, or dragging and dropping. You can change the NIC order by dragging and dropping as well. - {% endblocktrans%} + {% endblocktrans %}

    diff --git a/openstack_dashboard/dashboards/project/firewalls/templates/firewalls/_firewall_details.html b/openstack_dashboard/dashboards/project/firewalls/templates/firewalls/_firewall_details.html index 92ea2ccd9a..1a9d21ec02 100644 --- a/openstack_dashboard/dashboards/project/firewalls/templates/firewalls/_firewall_details.html +++ b/openstack_dashboard/dashboards/project/firewalls/templates/firewalls/_firewall_details.html @@ -18,7 +18,7 @@
    {% trans "Policy ID" %}
    - {% url 'horizon:project:firewalls:policydetails' firewall.firewall_policy_id as policy_url%} + {% url 'horizon:project:firewalls:policydetails' firewall.firewall_policy_id as policy_url %} {{ firewall.policy.name|default:firewall.policy.id }}
    diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_decryptpassword.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_decryptpassword.html index 1f7e83e5ae..8b4ee9ba63 100644 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_decryptpassword.html +++ b/openstack_dashboard/dashboards/project/instances/templates/instances/_decryptpassword.html @@ -4,7 +4,7 @@ {% block form_id %}password_instance_form{% endblock %} -{% block form_action %}{% url "horizon:project:instances:decryptpassword" instance_id keypair_name%}{% endblock %} +{% block form_action %}{% url "horizon:project:instances:decryptpassword" instance_id keypair_name %}{% endblock %} {% block modal_id %}password_instance_modal{% endblock %} {% block modal-header %}{% trans "Retrieve Instance Password" %}{% endblock %} diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html index f138539871..d5ea5c317e 100644 --- a/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html +++ b/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_overview.html @@ -121,7 +121,7 @@ {% for key, value in instance.metadata.items %}
    {{ key|force_escape }}
    {{ value|force_escape|default:default_item_value }}
    - {% endfor%} + {% endfor %} {% endwith %} diff --git a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/iframe.html b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/iframe.html index 2c00a9b9f3..de5656cf4c 100644 --- a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/iframe.html +++ b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/iframe.html @@ -6,7 +6,7 @@ {% include "horizon/_messages.html" %} - {% firstof table.render interfaces_table.render tab_group.render%} + {% firstof table.render interfaces_table.render tab_group.render %} {% include "project/network_topology/_post_massage.html" %} diff --git a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html index a36d68c926..6b8361c311 100644 --- a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html +++ b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/index.html @@ -19,8 +19,8 @@
    - - + +
    diff --git a/openstack_dashboard/dashboards/project/stacks/templates/stacks/_change_template.html b/openstack_dashboard/dashboards/project/stacks/templates/stacks/_change_template.html index 06f35f42d6..aa51293b6c 100644 --- a/openstack_dashboard/dashboards/project/stacks/templates/stacks/_change_template.html +++ b/openstack_dashboard/dashboards/project/stacks/templates/stacks/_change_template.html @@ -3,7 +3,7 @@ {% load url from future %} {% block form_id %}select_template{% endblock %} -{% block form_action %}{% url 'horizon:project:stacks:change_template' stack.id%}{% endblock %} +{% block form_action %}{% url 'horizon:project:stacks:change_template' stack.id %}{% endblock %} {% block form_attrs %}enctype="multipart/form-data"{% endblock %} {% block modal-header %}{% trans "Select Template" %}{% endblock %} diff --git a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_detail_overview.html b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_detail_overview.html index b574309209..347fab3e14 100644 --- a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_detail_overview.html +++ b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_detail_overview.html @@ -57,7 +57,7 @@
    {% trans "Image" %}
    - {% url 'horizon:project:images:images:detail' volume.volume_image_metadata.image_id as image_url%} + {% url 'horizon:project:images:images:detail' volume.volume_image_metadata.image_id as image_url %} {{ volume.volume_image_metadata.image_name }}
    diff --git a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend.html b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend.html index 390591a421..20fd6e4986 100644 --- a/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend.html +++ b/openstack_dashboard/dashboards/project/volumes/templates/volumes/volumes/_extend.html @@ -3,7 +3,7 @@ {% load url from future %} {% block form_id %}{% endblock %} -{% block form_action %}{% url 'horizon:project:volumes:volumes:extend' volume.id%}{% endblock %} +{% block form_action %}{% url 'horizon:project:volumes:volumes:extend' volume.id %}{% endblock %} {% block modal_id %}extend_volume_modal{% endblock %} {% block modal-header %}{% trans "Extend Volume" %}{% endblock %}