From c1bbe3f43ed62638e860c4eaf90f26a10763e6cd Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Thu, 20 Jul 2017 15:07:00 -0400 Subject: [PATCH] use all upper case variables for template vars from generator Standardize on all upper case variable names so it is easy to tell local variables in a template apart from global variables set by the generator. Change-Id: I69a73b580f1b32547287616c768887732553f9c5 Signed-off-by: Doug Hellmann --- tools/www-generator.py | 10 +++++----- www/errorpage.html | 2 +- www/pike/admin/index.html | 6 +++--- www/pike/api/index.html | 6 +++--- www/pike/configuration/index.html | 8 ++++---- www/pike/install/index.html | 6 +++--- www/pike/language-bindings.html | 8 ++++---- www/pike/projects.html | 4 ++-- www/pike/user/index.html | 8 ++++---- www/templates/base.tmpl | 4 ++-- www/templates/css.tmpl | 4 ++-- www/templates/indexbase.tmpl | 4 ++-- www/templates/script_footer.tmpl | 14 +++++++------- 13 files changed, 42 insertions(+), 42 deletions(-) diff --git a/tools/www-generator.py b/tools/www-generator.py index a7e7db0952..c7db4b736c 100755 --- a/tools/www-generator.py +++ b/tools/www-generator.py @@ -305,11 +305,11 @@ def render_template(environment, project_data, regular_repos, infra_repos, PAST_SERIES=PAST_SERIES, RELEASED_SERIES=RELEASED_SERIES, SERIES_IN_DEVELOPMENT=SERIES_IN_DEVELOPMENT, - topdir=topdir, - scriptdir=scriptdir, - cssdir=cssdir, - imagedir=imagedir, - series=series, + TOPDIR=topdir, + SCRIPTDIR=scriptdir, + CSSDIR=cssdir, + IMAGEDIR=imagedir, + SERIES=series, **extra ) if template_file.endswith('.html'): diff --git a/www/errorpage.html b/www/errorpage.html index d899b5c548..8868088ef3 100644 --- a/www/errorpage.html +++ b/www/errorpage.html @@ -4,10 +4,10 @@ + 404 Not Found - {% include 'templates/css.tmpl' %} {% block content %} diff --git a/www/pike/admin/index.html b/www/pike/admin/index.html index 5182a7c706..7f034abffe 100644 --- a/www/pike/admin/index.html +++ b/www/pike/admin/index.html @@ -1,4 +1,4 @@ -{% set projects = PROJECT_DATA[series] %} +{% set projects = PROJECT_DATA[SERIES] %} {% extends "templates/base.tmpl" %} {% block pagetitle %}Administrator Guides{% endblock %} {% block title %} @@ -10,7 +10,7 @@
-

OpenStack {% if series != 'latest' %}{{series|title}}{% endif %} Administrator Guides

+

OpenStack {% if SERIES != 'latest' %}{{SERIES|title}}{% endif %} Administrator Guides

This page contains documentation about administering OpenStack services.

@@ -25,7 +25,7 @@

Administrator Guides for OpenStack Services

{% for project in projects|sort(attribute='name') -%} {% if project.type in ['service', 'other'] and project.has_admin_guide %} - + {{project.service}} ({{project.name}})
{% endif %} diff --git a/www/pike/api/index.html b/www/pike/api/index.html index 4790cd4a67..6e59613f97 100644 --- a/www/pike/api/index.html +++ b/www/pike/api/index.html @@ -1,4 +1,4 @@ -{% set projects = PROJECT_DATA[series] %} +{% set projects = PROJECT_DATA[SERIES] %} {% extends "templates/base.tmpl" %} {% block pagetitle %}API references{% endblock %} {% block title %}API references{% endblock %} @@ -10,7 +10,7 @@
-

OpenStack {% if series != 'latest' %}{{series|title}}{% endif %} API Reference Documentation

+

OpenStack {% if SERIES != 'latest' %}{{SERIES|title}}{% endif %} API Reference Documentation

This page contains documentation about the OpenStack API and how to use it.

@@ -35,7 +35,7 @@ API Reference {% endif %} {% if project.has_in_tree_api_docs %} - API Guide + API Guide {% endif %} {% if project.has_api_guide %} API Guide diff --git a/www/pike/configuration/index.html b/www/pike/configuration/index.html index 7c07dbcd35..908fd9ac67 100644 --- a/www/pike/configuration/index.html +++ b/www/pike/configuration/index.html @@ -1,4 +1,4 @@ -{% set projects = PROJECT_DATA[series] %} +{% set projects = PROJECT_DATA[SERIES] %} {% extends "templates/base.tmpl" %} {% block pagetitle %}Configuration Guides{% endblock %} {% block title %} @@ -10,7 +10,7 @@
-

OpenStack {% if series != 'latest' %}{{series|title}}{% endif %} Configuration Guides

+

OpenStack {% if SERIES != 'latest' %}{{SERIES|title}}{% endif %} Configuration Guides

This page contains documentation about configuring OpenStack services.

@@ -23,12 +23,12 @@