doc: Remove errant newline in the plugin tutorial

{% include %} syntax cannot have a newline.

Closes-Bug: #1774054

This commit also cleans up several things.

* setup.cfg: Rename "classifiers" to the correct keyword "classifier"
* setup.cfg: Add Python 3 classifier
* Quote literals

Change-Id: I14c2217a69ea489c72b311b26b5eb4a5e4865059
This commit is contained in:
Akihiro Motoki 2019-01-09 02:06:03 +09:00
parent d0297a5ed0
commit 5e07d03f90
1 changed files with 10 additions and 11 deletions

View File

@ -154,8 +154,8 @@ _31000_myplugin.py::
.. Note :: .. Note ::
Currently, AUTO_DISCOVER_STATIC_FILES = True will only discover JavaScript files, Currently, ``AUTO_DISCOVER_STATIC_FILES = True`` will only discover
not SCSS files. JavaScript files, not SCSS files.
my_rest_api.py my_rest_api.py
-------------- --------------
@ -242,8 +242,7 @@ AngularJS section below.::
{% block title %}{% trans "My plugin" %}{% endblock %} {% block title %}{% trans "My plugin" %}{% endblock %}
{% block page_header %} {% block page_header %}
{% include "horizon/common/_domain_page_header.html" {% include "horizon/common/_domain_page_header.html" with title=_("My Panel") %}
with title=_("My Panel") %}
{% endblock page_header %} {% endblock page_header %}
{% block main %} {% block main %}
@ -296,7 +295,7 @@ setup.cfg
author = myname author = myname
author_email = myemail author_email = myemail
home-page = https://docs.openstack.org/horizon/latest/ home-page = https://docs.openstack.org/horizon/latest/
classifiers = [ classifier =
Environment :: OpenStack Environment :: OpenStack
Framework :: Django Framework :: Django
Intended Audience :: Developers Intended Audience :: Developers
@ -306,6 +305,7 @@ setup.cfg
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2 Programming Language :: Python :: 2
Programming Language :: Python :: 2.7 Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.5
[files] [files]
@ -343,16 +343,15 @@ panel.
{% endblock page_header %} {% endblock page_header %}
{% block main %} {% block main %}
<ng-include <ng-include src="'{{ STATIC_URL }}dashboard/identity/myplugin/mypanel/mypanel.html'">
src="'{{ STATIC_URL }}dashboard/identity/myplugin/mypanel/mypanel.html'">
</ng-include> </ng-include>
{% endblock %} {% endblock %}
This template contains both Django and AngularJS code. Angular is denoted by This template contains both Django and AngularJS code. Angular is denoted by
{$..$} while Django is denoted by {{..}} and {%..%}. This template gets ``{$..$}`` while Django is denoted by ``{{..}}`` and ``{%..%}``. This template
processed twice, once by Django on the server-side and once more by Angular on gets processed twice, once by Django on the server-side and once more by Angular
the client-side. This means that the expressions in {{..}} and {%..%} are on the client-side. This means that the expressions in ``{{..}}`` and ``{%..%}``
substituted with values by the time it reaches your Angular template. are substituted with values by the time it reaches your Angular template.
What you chose to include in ``block main`` is entirely up to you. Since you are What you chose to include in ``block main`` is entirely up to you. Since you are
creating an Angular plugin, we recommend that you keep everything in this creating an Angular plugin, we recommend that you keep everything in this