Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 451031077F for ; Tue, 22 Oct 2013 15:50:26 +0000 (UTC) Received: (qmail 94946 invoked by uid 500); 22 Oct 2013 15:50:24 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 94871 invoked by uid 500); 22 Oct 2013 15:50:24 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 94730 invoked by uid 99); 22 Oct 2013 15:50:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2013 15:50:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 574E550AF1; Tue, 22 Oct 2013 15:50:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: dmitriusan@apache.org To: ambari-commits@incubator.apache.org Date: Tue, 22 Oct 2013 15:50:33 -0000 Message-Id: <4ef51f2e3e684a498f9b907e9c74eca5@git.apache.org> In-Reply-To: <2fb5c6d9c58b4b32badd5a26db258643@git.apache.org> References: <2fb5c6d9c58b4b32badd5a26db258643@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [11/11] git commit: AMBARI-3557. Resource Management. Add jinja2 to ambari-common, rpms and pythonpath (Andrew Onischuk via dlysnichenko) AMBARI-3557. Resource Management. Add jinja2 to ambari-common, rpms and pythonpath (Andrew Onischuk via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/f0733293 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/f0733293 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/f0733293 Branch: refs/heads/trunk Commit: f073329382f379a98364e5b0f28402796cef6575 Parents: 6001f06 Author: Lisnichenko Dmitro Authored: Tue Oct 22 18:48:31 2013 +0300 Committer: Lisnichenko Dmitro Committed: Tue Oct 22 18:49:59 2013 +0300 ---------------------------------------------------------------------- LICENSE.txt | 34 + NOTICE.txt | 6 + ambari-agent/pom.xml | 14 +- ambari-common/src/main/python/jinja2/AUTHORS | 31 + ambari-common/src/main/python/jinja2/CHANGES | 235 +++ ambari-common/src/main/python/jinja2/LICENSE | 31 + .../src/main/python/jinja2/MANIFEST.in | 12 + ambari-common/src/main/python/jinja2/Makefile | 4 + .../main/python/jinja2/artwork/jinjalogo.svg | 132 ++ .../python/jinja2/custom_fixers/__init__.py | 0 .../jinja2/custom_fixers/fix_alt_unicode.py | 13 + .../custom_fixers/fix_broken_reraising.py | 21 + .../python/jinja2/custom_fixers/fix_xrange2.py | 11 + .../src/main/python/jinja2/docs/Makefile | 75 + .../src/main/python/jinja2/docs/_build/.ignore | 0 .../src/main/python/jinja2/docs/_static/.ignore | 0 .../main/python/jinja2/docs/_static/jinja.js | 26 + .../main/python/jinja2/docs/_static/print.css | 5 + .../main/python/jinja2/docs/_static/style.css | 390 +++++ .../main/python/jinja2/docs/_templates/.ignore | 0 .../python/jinja2/docs/_templates/genindex.html | 36 + .../python/jinja2/docs/_templates/layout.html | 77 + .../jinja2/docs/_templates/opensearch.xml | 9 + .../python/jinja2/docs/_templates/page.html | 4 + .../python/jinja2/docs/_templates/search.html | 35 + .../src/main/python/jinja2/docs/api.rst | 787 +++++++++ .../main/python/jinja2/docs/cache_extension.py | 56 + .../src/main/python/jinja2/docs/changelog.rst | 3 + .../src/main/python/jinja2/docs/conf.py | 141 ++ .../src/main/python/jinja2/docs/extensions.rst | 347 ++++ .../src/main/python/jinja2/docs/faq.rst | 191 ++ .../src/main/python/jinja2/docs/index.rst | 27 + .../src/main/python/jinja2/docs/integration.rst | 88 + .../src/main/python/jinja2/docs/intro.rst | 168 ++ .../src/main/python/jinja2/docs/jinjaext.py | 192 ++ .../src/main/python/jinja2/docs/sandbox.rst | 46 + .../src/main/python/jinja2/docs/switching.rst | 242 +++ .../src/main/python/jinja2/docs/templates.rst | 1365 +++++++++++++++ .../src/main/python/jinja2/docs/tricks.rst | 100 ++ .../main/python/jinja2/examples/basic/cycle.py | 13 + .../python/jinja2/examples/basic/debugger.py | 7 + .../python/jinja2/examples/basic/inheritance.py | 12 + .../jinja2/examples/basic/templates/broken.html | 6 + .../examples/basic/templates/subbroken.html | 3 + .../main/python/jinja2/examples/basic/test.py | 27 + .../basic/test_filter_and_linestatements.py | 25 + .../jinja2/examples/basic/test_loop_filter.py | 12 + .../python/jinja2/examples/basic/translate.py | 6 + .../src/main/python/jinja2/examples/bench.py | 433 +++++ .../src/main/python/jinja2/examples/profile.py | 52 + .../jinja2/examples/rwbench/django/_form.html | 1 + .../examples/rwbench/django/_input_field.html | 1 + .../examples/rwbench/django/_textarea.html | 1 + .../jinja2/examples/rwbench/django/index.html | 29 + .../jinja2/examples/rwbench/django/layout.html | 29 + .../python/jinja2/examples/rwbench/djangoext.py | 135 ++ .../jinja2/examples/rwbench/genshi/helpers.html | 12 + .../jinja2/examples/rwbench/genshi/index.html | 41 + .../jinja2/examples/rwbench/genshi/layout.html | 30 + .../jinja2/examples/rwbench/jinja/helpers.html | 12 + .../jinja2/examples/rwbench/jinja/index.html | 29 + .../jinja2/examples/rwbench/jinja/layout.html | 29 + .../jinja2/examples/rwbench/mako/helpers.html | 11 + .../jinja2/examples/rwbench/mako/index.html | 31 + .../jinja2/examples/rwbench/mako/layout.html | 30 + .../python/jinja2/examples/rwbench/rwbench.py | 112 ++ .../main/python/jinja2/ext/Vim/htmljinja.vim | 27 + .../src/main/python/jinja2/ext/Vim/jinja.vim | 113 ++ .../jinja2/ext/django2jinja/django2jinja.py | 768 ++++++++ .../python/jinja2/ext/django2jinja/example.py | 7 + .../ext/django2jinja/templates/index.html | 58 + .../ext/django2jinja/templates/layout.html | 4 + .../ext/django2jinja/templates/subtemplate.html | 1 + .../src/main/python/jinja2/ext/djangojinja2.py | 86 + .../src/main/python/jinja2/ext/inlinegettext.py | 78 + .../src/main/python/jinja2/ext/jinja.el | 213 +++ .../src/main/python/jinja2/jinja2-debug.py | 40 + .../src/main/python/jinja2/jinja2/__init__.py | 73 + .../main/python/jinja2/jinja2/_debugsupport.c | 78 + .../jinja2/jinja2/_markupsafe/__init__.py | 225 +++ .../python/jinja2/jinja2/_markupsafe/_bundle.py | 49 + .../jinja2/jinja2/_markupsafe/_constants.py | 267 +++ .../python/jinja2/jinja2/_markupsafe/_native.py | 45 + .../python/jinja2/jinja2/_markupsafe/tests.py | 80 + .../main/python/jinja2/jinja2/_stringdefs.py | 130 ++ .../src/main/python/jinja2/jinja2/bccache.py | 280 +++ .../src/main/python/jinja2/jinja2/compiler.py | 1640 ++++++++++++++++++ .../src/main/python/jinja2/jinja2/constants.py | 32 + .../src/main/python/jinja2/jinja2/debug.py | 308 ++++ .../src/main/python/jinja2/jinja2/defaults.py | 40 + .../main/python/jinja2/jinja2/environment.py | 1118 ++++++++++++ .../src/main/python/jinja2/jinja2/exceptions.py | 143 ++ .../src/main/python/jinja2/jinja2/ext.py | 610 +++++++ .../src/main/python/jinja2/jinja2/filters.py | 719 ++++++++ .../src/main/python/jinja2/jinja2/lexer.py | 681 ++++++++ .../src/main/python/jinja2/jinja2/loaders.py | 449 +++++ .../src/main/python/jinja2/jinja2/meta.py | 102 ++ .../src/main/python/jinja2/jinja2/nodes.py | 901 ++++++++++ .../src/main/python/jinja2/jinja2/optimizer.py | 68 + .../src/main/python/jinja2/jinja2/parser.py | 896 ++++++++++ .../src/main/python/jinja2/jinja2/runtime.py | 544 ++++++ .../src/main/python/jinja2/jinja2/sandbox.py | 271 +++ .../src/main/python/jinja2/jinja2/tests.py | 146 ++ .../python/jinja2/jinja2/testsuite/__init__.py | 95 + .../main/python/jinja2/jinja2/testsuite/api.py | 240 +++ .../python/jinja2/jinja2/testsuite/core_tags.py | 286 +++ .../python/jinja2/jinja2/testsuite/debug.py | 60 + .../python/jinja2/jinja2/testsuite/doctests.py | 29 + .../main/python/jinja2/jinja2/testsuite/ext.py | 455 +++++ .../python/jinja2/jinja2/testsuite/filters.py | 291 ++++ .../python/jinja2/jinja2/testsuite/imports.py | 144 ++ .../jinja2/jinja2/testsuite/inheritance.py | 208 +++ .../python/jinja2/jinja2/testsuite/lexnparse.py | 390 +++++ .../python/jinja2/jinja2/testsuite/loader.py | 191 ++ .../jinja2/jinja2/testsuite/regression.py | 258 +++ .../jinja2/jinja2/testsuite/res/__init__.py | 0 .../jinja2/testsuite/res/templates/broken.html | 3 + .../testsuite/res/templates/foo/test.html | 1 + .../testsuite/res/templates/syntaxerror.html | 4 + .../jinja2/testsuite/res/templates/test.html | 1 + .../python/jinja2/jinja2/testsuite/security.py | 134 ++ .../python/jinja2/jinja2/testsuite/tests.py | 87 + .../python/jinja2/jinja2/testsuite/utils.py | 85 + .../src/main/python/jinja2/jinja2/utils.py | 601 +++++++ .../src/main/python/jinja2/jinja2/visitor.py | 87 + .../src/main/python/jinja2/scripts/pylintrc | 301 ++++ ambari-common/src/main/python/jinja2/setup.cfg | 6 + ambari-common/src/main/python/jinja2/setup.py | 110 ++ 128 files changed, 21439 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/LICENSE.txt ---------------------------------------------------------------------- diff --git a/LICENSE.txt b/LICENSE.txt index ffa9134..795eb37 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -316,3 +316,37 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +For jinja2, used by resource management library as a templating engine: + +Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details. + +Some rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/NOTICE.txt ---------------------------------------------------------------------- diff --git a/NOTICE.txt b/NOTICE.txt index 755215e..9e59af8 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -14,3 +14,9 @@ Resource management library derived from Kokki, which is under following copyrig Copyright (c) 2009 Samuel Stauffer All rights reserved. + +Jinja2, the templating library used by resource management library: + +Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details. +Some rights reserved. + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-agent/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml index 6fdbe54..1b3c579 100644 --- a/ambari-agent/pom.xml +++ b/ambari-agent/pom.xml @@ -41,6 +41,7 @@ http://downloads.puppetlabs.com/puppet/puppet-2.7.9.tar.gz /usr/lib/python2.6/site-packages/ambari_agent /usr/lib/python2.6/site-packages/resource_management + /usr/lib64/python2.6/site-packages/jinja2 http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.15/repos/centos6/ruby-1.8.7-p370.tar.gz /usr/lib/ambari-agent/lib python >= 2.6 @@ -123,7 +124,7 @@ unitTests.py - ${project.basedir}/../ambari-common/src/test/python:${project.basedir}/src/main/python/ambari_agent:${project.basedir}/src/main/python/resource_management:${project.basedir}/src/main/puppet/modules/hdp-hadoop/files:$PYTHONPATH + ${project.basedir}/../ambari-common/src/test/python:${project.basedir}/../ambari-common/src/main/python:${project.basedir}/src/main/python/ambari_agent:${project.basedir}/src/main/python/resource_management:${project.basedir}/src/main/puppet/modules/hdp-hadoop/files:$PYTHONPATH ${skipTests} @@ -219,6 +220,17 @@ + + ${jinja.install.dir} + + + ${project.basedir}/../ambari-common/src/main/python/jinja2/jinja2 + + ${project.basedir}/../ambari-common/src/main/python/jinja2/jinja2/testsuite + + + + ${lib.dir}/examples 755 http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/AUTHORS ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/AUTHORS b/ambari-common/src/main/python/jinja2/AUTHORS new file mode 100644 index 0000000..c6cd9ba --- /dev/null +++ b/ambari-common/src/main/python/jinja2/AUTHORS @@ -0,0 +1,31 @@ +Jinja is written and maintained by the Jinja Team and various +contributors: + +Lead Developer: + +- Armin Ronacher + +Developers: + +- Christoph Hack +- Georg Brandl + +Contributors: + +- Bryan McLemore +- Mickaël Guérin +- Cameron Knight +- Lawrence Journal-World. +- David Cramer + +Patches and suggestions: + +- Ronny Pfannschmidt +- Axel Böhm +- Alexey Melchakov +- Bryan McLemore +- Clovis Fabricio (nosklo) +- Cameron Knight +- Peter van Dijk (Habbie) +- Stefan Ebner +- Rene Leonhardt http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/CHANGES ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/CHANGES b/ambari-common/src/main/python/jinja2/CHANGES new file mode 100644 index 0000000..2a49c64 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/CHANGES @@ -0,0 +1,235 @@ +Jinja2 Changelog +================ + +Version 2.5.5 +------------- +(re-release of 2.5.4 with built documentation removed for filesize. + Released on October 18th 2010) + +- built documentation is no longer part of release. + +Version 2.5.4 +------------- +(bugfix release, released on October 17th 2010) + +- Fixed extensions not loading properly with overlays. +- Work around a bug in cpython for the debugger that causes segfaults + on 64bit big-endian architectures. + +Version 2.5.3 +------------- +(bugfix release, released on October 17th 2010) + +- fixed an operator precedence error introduced in 2.5.2. Statements + like "-foo.bar" had their implicit parentheses applied around the + first part of the expression ("(-foo).bar") instead of the more + correct "-(foo.bar)". + +Version 2.5.2 +------------- +(bugfix release, released on August 18th 2010) + +- improved setup.py script to better work with assumptions people + might still have from it (``--with-speedups``). +- fixed a packaging error that excluded the new debug support. + +Version 2.5.1 +------------- +(bugfix release, released on August 17th 2010) + +- StopIteration exceptions raised by functions called from templates + are now intercepted and converted to undefineds. This solves a + lot of debugging grief. (StopIteration is used internally to + abort template execution) +- improved performance of macro calls slightly. +- babel extraction can now properly extract newstyle gettext calls. +- using the variable `num` in newstyle gettext for something else + than the pluralize count will no longer raise a :exc:`KeyError`. +- removed builtin markup class and switched to markupsafe. For backwards + compatibility the pure Python implementation still exists but is + pulled from markupsafe by the Jinja2 developers. The debug support + went into a separate feature called "debugsupport" and is disabled + by default because it is only relevant for Python 2.4 +- fixed an issue with unary operators having the wrong precendence. + +Version 2.5 +----------- +(codename Incoherence, relased on May 29th 2010) + +- improved the sort filter (should have worked like this for a + long time) by adding support for case insensitive searches. +- fixed a bug for getattribute constant folding. +- support for newstyle gettext translations which result in a + nicer in-template user interface and more consistent + catalogs. (:ref:`newstyle-gettext`) +- it's now possible to register extensions after an environment + was created. + +Version 2.4.1 +------------- +(bugfix release, released on April 20th 2010) + +- fixed an error reporting bug for undefineds. + +Version 2.4 +----------- +(codename Correlation, released on April 13th 2010) + +- the environment template loading functions now transparently + pass through a template object if it was passed to it. This + makes it possible to import or extend from a template object + that was passed to the template. +- added a :class:`ModuleLoader` that can load templates from + precompiled sources. The environment now features a method + to compile the templates from a configured loader into a zip + file or folder. +- the _speedups C extension now supports Python 3. +- added support for autoescaping toggling sections and support + for evaluation contexts (:ref:`eval-context`). +- extensions have a priority now. + +Version 2.3.1 +------------- +(bugfix release, released on February 19th 2010) + +- fixed an error reporting bug on all python versions +- fixed an error reporting bug on Python 2.4 + +Version 2.3 +----------- +(3000 Pythons, released on February 10th 2010) + +- fixes issue with code generator that causes unbound variables + to be generated if set was used in if-blocks and other small + identifier problems. +- include tags are now able to select between multiple templates + and take the first that exists, if a list of templates is + given. +- fixed a problem with having call blocks in outer scopes that + have an argument that is also used as local variable in an + inner frame (#360). +- greatly improved error message reporting (#339) +- implicit tuple expressions can no longer be totally empty. + This change makes ``{% if %}...{% endif %}`` a syntax error + now. (#364) +- added support for translator comments if extracted via babel. +- added with-statement extension. +- experimental Python 3 support. + +Version 2.2.1 +------------- +(bugfix release, released on September 14th 2009) + +- fixes some smaller problems for Jinja2 on Jython. + +Version 2.2 +----------- +(codename Kong, released on September 13th 2009) + +- Include statements can now be marked with ``ignore missing`` to skip + non existing templates. +- Priority of `not` raised. It's now possible to write `not foo in bar` + as an alias to `foo not in bar` like in python. Previously the grammar + required parentheses (`not (foo in bar)`) which was odd. +- Fixed a bug that caused syntax errors when defining macros or using the + `{% call %}` tag inside loops. +- Fixed a bug in the parser that made ``{{ foo[1, 2] }}`` impossible. +- Made it possible to refer to names from outer scopes in included templates + that were unused in the callers frame (#327) +- Fixed a bug that caused internal errors if names where used as iteration + variable and regular variable *after* the loop if that variable was unused + *before* the loop. (#331) +- Added support for optional `scoped` modifier to blocks. +- Added support for line-comments. +- Added the `meta` module. +- Renamed (undocumented) attribute "overlay" to "overlayed" on the + environment because it was clashing with a method of the same name. +- speedup extension is now disabled by default. + +Version 2.1.1 +------------- +(Bugfix release) + +- Fixed a translation error caused by looping over empty recursive loops. + +Version 2.1 +----------- +(codename Yasuzō, released on November 23rd 2008) + +- fixed a bug with nested loops and the special loop variable. Before the + change an inner loop overwrote the loop variable from the outer one after + iteration. + +- fixed a bug with the i18n extension that caused the explicit pluralization + block to look up the wrong variable. + +- fixed a limitation in the lexer that made ``{{ foo.0.0 }}`` impossible. + +- index based subscribing of variables with a constant value returns an + undefined object now instead of raising an index error. This was a bug + caused by eager optimizing. + +- the i18n extension looks up `foo.ugettext` now followed by `foo.gettext` + if an translations object is installed. This makes dealing with custom + translations classes easier. + +- fixed a confusing behavior with conditional extending. loops were partially + executed under some conditions even though they were not part of a visible + area. + +- added `sort` filter that works like `dictsort` but for arbitrary sequences. + +- fixed a bug with empty statements in macros. + +- implemented a bytecode cache system. (:ref:`bytecode-cache`) + +- the template context is now weakref-able + +- inclusions and imports "with context" forward all variables now, not only + the initial context. + +- added a cycle helper called `cycler`. + +- added a joining helper called `joiner`. + +- added a `compile_expression` method to the environment that allows compiling + of Jinja expressions into callable Python objects. + +- fixed an escaping bug in urlize + +Version 2.0 +----------- +(codename jinjavitus, released on July 17th 2008) + +- the subscribing of objects (looking up attributes and items) changed from + slightly. It's now possible to give attributes or items a higher priority + by either using dot-notation lookup or the bracket syntax. This also + changed the AST slightly. `Subscript` is gone and was replaced with + :class:`~jinja2.nodes.Getitem` and :class:`~jinja2.nodes.Getattr`. + + For more information see :ref:`the implementation details `. + +- added support for preprocessing and token stream filtering for extensions. + This would allow extensions to allow simplified gettext calls in template + data and something similar. + +- added :meth:`jinja2.environment.TemplateStream.dump`. + +- added missing support for implicit string literal concatenation. + ``{{ "foo" "bar" }}`` is equivalent to ``{{ "foobar" }}`` + +- `else` is optional for conditional expressions. If not given it evaluates + to `false`. + +- improved error reporting for undefined values by providing a position. + +- `filesizeformat` filter uses decimal prefixes now per default and can be + set to binary mode with the second parameter. + +- fixed bug in finalizer + +Version 2.0rc1 +-------------- +(no codename, released on June 9th 2008) + +- first release of Jinja2 http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/LICENSE ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/LICENSE b/ambari-common/src/main/python/jinja2/LICENSE new file mode 100644 index 0000000..31bf900 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/LICENSE @@ -0,0 +1,31 @@ +Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details. + +Some rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/MANIFEST.in ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/MANIFEST.in b/ambari-common/src/main/python/jinja2/MANIFEST.in new file mode 100644 index 0000000..aeb66af --- /dev/null +++ b/ambari-common/src/main/python/jinja2/MANIFEST.in @@ -0,0 +1,12 @@ +include MANIFEST.in Makefile CHANGES LICENSE AUTHORS jinja2/_debugsupport.c +recursive-include docs * +recursive-include custom_fixers * +recursive-include ext * +recursive-include artwork * +recursive-include examples * +recursive-include jinja2/testsuite/res * +recursive-exclude docs/_build * +recursive-exclude jinja2 *.pyc +recursive-exclude docs *.pyc +recursive-exclude jinja2 *.pyo +recursive-exclude docs *.pyo http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/Makefile ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/Makefile b/ambari-common/src/main/python/jinja2/Makefile new file mode 100644 index 0000000..60ca1d7 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/Makefile @@ -0,0 +1,4 @@ +test: + python setup.py test + +.PHONY: test http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/artwork/jinjalogo.svg ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/artwork/jinjalogo.svg b/ambari-common/src/main/python/jinja2/artwork/jinjalogo.svg new file mode 100644 index 0000000..0bc9ea4 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/artwork/jinjalogo.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/custom_fixers/__init__.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/custom_fixers/__init__.py b/ambari-common/src/main/python/jinja2/custom_fixers/__init__.py new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/custom_fixers/fix_alt_unicode.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/custom_fixers/fix_alt_unicode.py b/ambari-common/src/main/python/jinja2/custom_fixers/fix_alt_unicode.py new file mode 100644 index 0000000..96a81c1 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/custom_fixers/fix_alt_unicode.py @@ -0,0 +1,13 @@ +from lib2to3 import fixer_base +from lib2to3.fixer_util import Name, BlankLine + + +class FixAltUnicode(fixer_base.BaseFix): + PATTERN = """ + func=funcdef< 'def' name='__unicode__' + parameters< '(' NAME ')' > any+ > + """ + + def transform(self, node, results): + name = results['name'] + name.replace(Name('__str__', prefix=name.prefix)) http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/custom_fixers/fix_broken_reraising.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/custom_fixers/fix_broken_reraising.py b/ambari-common/src/main/python/jinja2/custom_fixers/fix_broken_reraising.py new file mode 100644 index 0000000..fd0ea68 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/custom_fixers/fix_broken_reraising.py @@ -0,0 +1,21 @@ +from lib2to3 import fixer_base, pytree +from lib2to3.fixer_util import Name, BlankLine, Name, Attr, ArgList + + +class FixBrokenReraising(fixer_base.BaseFix): + PATTERN = """ + raise_stmt< 'raise' any ',' val=any ',' tb=any > + """ + + # run before the broken 2to3 checker with the same goal + # tries to rewrite it with a rule that does not work out for jinja + run_order = 1 + + def transform(self, node, results): + tb = results['tb'].clone() + tb.prefix = '' + with_tb = Attr(results['val'].clone(), Name('with_traceback')) + \ + [ArgList([tb])] + new = pytree.Node(self.syms.simple_stmt, [Name("raise")] + with_tb) + new.prefix = node.prefix + return new http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/custom_fixers/fix_xrange2.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/custom_fixers/fix_xrange2.py b/ambari-common/src/main/python/jinja2/custom_fixers/fix_xrange2.py new file mode 100644 index 0000000..5d35e50 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/custom_fixers/fix_xrange2.py @@ -0,0 +1,11 @@ +from lib2to3 import fixer_base +from lib2to3.fixer_util import Name, BlankLine + + +# whyever this is necessary.. + +class FixXrange2(fixer_base.BaseFix): + PATTERN = "'xrange'" + + def transform(self, node, results): + node.replace(Name('range', prefix=node.prefix)) http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/Makefile ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/Makefile b/ambari-common/src/main/python/jinja2/docs/Makefile new file mode 100644 index 0000000..5e24ec1 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/Makefile @@ -0,0 +1,75 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html web pickle htmlhelp latex changes linkcheck + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " changes to make an overview over all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + +clean: + -rm -rf _build/* + +html: + mkdir -p _build/html _build/doctrees + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html + @echo + @echo "Build finished. The HTML pages are in _build/html." + +pickle: + mkdir -p _build/pickle _build/doctrees + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle + @echo + @echo "Build finished; now you can process the pickle files" + +json: + mkdir -p _build/json _build/doctrees + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json + @echo + @echo "Build finished; now you can process the json files" + +web: pickle + +htmlhelp: + mkdir -p _build/htmlhelp _build/doctrees + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in _build/htmlhelp." + +latex: + mkdir -p _build/latex _build/doctrees + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex + @echo + @echo "Build finished; the LaTeX files are in _build/latex." + @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ + "run these through (pdf)latex." + +changes: + mkdir -p _build/changes _build/doctrees + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes + @echo + @echo "The overview file is in _build/changes." + +linkcheck: + mkdir -p _build/linkcheck _build/doctrees + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in _build/linkcheck/output.txt." http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_build/.ignore ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_build/.ignore b/ambari-common/src/main/python/jinja2/docs/_build/.ignore new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_static/.ignore ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_static/.ignore b/ambari-common/src/main/python/jinja2/docs/_static/.ignore new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_static/jinja.js ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_static/jinja.js b/ambari-common/src/main/python/jinja2/docs/_static/jinja.js new file mode 100644 index 0000000..1c04218 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/_static/jinja.js @@ -0,0 +1,26 @@ +$(function() { + + var + toc = $('#toc').show(), + items = $('#toc > ul').hide(); + + $('#toc h3') + .click(function() { + if (items.is(':visible')) { + items.animate({ + height: 'hide', + opacity: 'hide' + }, 300, function() { + toc.removeClass('expandedtoc'); + }); + } + else { + items.animate({ + height: 'show', + opacity: 'show' + }, 400); + toc.addClass('expandedtoc'); + } + }); + +}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_static/print.css ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_static/print.css b/ambari-common/src/main/python/jinja2/docs/_static/print.css new file mode 100644 index 0000000..fb633d8 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/_static/print.css @@ -0,0 +1,5 @@ +div.header, div.relnav, #toc { display: none; } +#contentwrapper { padding: 0; margin: 0; border: none; } +body { color: black; background-color: white; } +div.footer { border-top: 1px solid #888; color: #888; margin-top: 1cm; } +div.footer a { text-decoration: none; } http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_static/style.css ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_static/style.css b/ambari-common/src/main/python/jinja2/docs/_static/style.css new file mode 100644 index 0000000..a1c4d59 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/_static/style.css @@ -0,0 +1,390 @@ +body { + background-color: #222; + margin: 0; + padding: 0; + font-family: 'Georgia', serif; + font-size: 15px; + color: #eee; +} + +div.footer { + border-top: 1px solid #111; + padding: 8px; + font-size: 11px; + text-align: center; + letter-spacing: 0.5px; +} + +div.footer a { + color: #eee; +} + +div.header { + margin: 0 -15px 0 -15px; + background: url(headerbg.png) repeat-x; + border-top: 6px solid #D20000; +} + +div.relnav { + border-bottom: 1px solid #111; + background: url(navigation.png); + margin: 0 -15px 0 -15px; + padding: 2px 20px 0 28px; + line-height: 25px; + color: #aaa; + font-size: 12px; + text-align: center; +} + +div.relnav a { + color: #eee; + font-weight: bold; + text-decoration: none; +} + +div.relnav a:hover { + text-decoration: underline; +} + +#content { + background-color: white; + color: #111; + border-bottom: 1px solid black; + background: url(watermark.png) center 0; + padding: 0 15px 0 15px; + margin: 0; +} + +h1 { + margin: 0; + padding: 15px 0 0 0; +} + +h1.heading { + margin: 0; + padding: 0; + height: 80px; +} + +h1.heading:hover { + background: #222; +} + +h1.heading a { + background: url(jinjabanner.png) no-repeat center 0; + display: block; + width: 100%; + height: 80px; +} + +h1.heading a:focus { + -moz-outline: none; + outline: none; +} + +h1.heading span { + display: none; +} + +#jinjalogo { + background-image: url(jinjalogo.png); + background-repeat: no-repeat; + width: 400px; + height: 160px; +} + +#contentwrapper { + max-width: 680px; + padding: 0 18px 20px 18px; + margin: 0 auto 0 auto; + border-right: 1px solid #eee; + border-left: 1px solid #eee; + background: url(watermark_blur.png) center -114px; +} + +#contentwrapper h2, +#contentwrapper h2 a { + color: #222; + font-size: 24px; + margin: 20px 0 0 0; +} + +#contentwrapper h3, +#contentwrapper h3 a { + color: #b41717; + font-size: 20px; + margin: 20px 0 0 0; +} + +table.docutils { + border-collapse: collapse; + border: 2px solid #aaa; + margin: 0.5em 1.5em 0.5em 1.5em; +} + +table.docutils td { + padding: 2px; + border: 1px solid #ddd; +} + +p, li, dd, dt, blockquote { + color: #333; +} + +blockquote { + margin: 10px 0 10px 20px; +} + +p { + line-height: 20px; + margin-bottom: 0; + margin-top: 10px; +} + +hr { + border-top: 1px solid #ccc; + border-bottom: 0; + border-right: 0; + border-left: 0; + margin-bottom: 10px; + margin-top: 20px; +} + +dl { + margin-left: 10px; +} + +li, dt { + margin-top: 5px; +} + +dt { + font-weight: bold; + color: #000; +} + +dd { + margin-top: 10px; + line-height: 20px; +} + +th { + text-align: left; + padding: 3px; + background-color: #f2f2f2; +} + +a { + color: #b41717; +} + +a:hover { + color: #444; +} + +pre { + background: #ededed url(metal.png); + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; + padding: 5px; + font-size: 13px; + font-family: 'Bitstream Vera Sans Mono', 'Monaco', monospace; +} + +tt { + font-size: 13px; + font-family: 'Bitstream Vera Sans Mono', 'Monaco', monospace; + color: black; + padding: 1px 2px 1px 2px; + background-color: #fafafa; + border-bottom: 1px solid #eee; +} + +a.reference:hover tt { + border-bottom-color: #aaa; +} + +cite { + /* abusing , it's generated by ReST for `x` */ + font-size: 13px; + font-family: 'Bitstream Vera Sans Mono', 'Monaco', monospace; + font-weight: bold; + font-style: normal; +} + +div.admonition { + margin: 10px 0 10px 0; + padding: 10px 10px 10px 60px; + border: 1px solid #ccc; +} + +div.admonition p.admonition-title { + background-color: #b41717; + color: white; + margin: -10px -10px 10px -60px; + padding: 4px 10px 4px 10px; + font-weight: bold; + font-size: 15px; +} + +div.admonition p.admonition-title a { + color: white!important; +} + +div.admonition-note { + background: url(note.png) no-repeat 10px 40px; +} + +div.admonition-implementation { + background: url(implementation.png) no-repeat 10px 40px; +} + +a.headerlink { + color: #B4B4B4!important; + font-size: 0.8em; + padding: 0 4px 0 4px; + text-decoration: none!important; + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +a.headerlink:hover { + background-color: #B4B4B4; + color: #F0F0F0!important; +} + +table.indextable { + width: 100%; +} + +table.indextable td { + vertical-align: top; + width: 50%; +} + +table.indextable dl dd { + font-size: 11px; +} + +table.indextable dl dd a { + color: #000; +} + +dl.function dt, +dl.class dt, +dl.exception dt, +dl.method dt, +dl.attribute dt { + font-weight: normal; +} + +dt .descname { + font-weight: bold; + margin-right: 4px; +} + +dt .descname, dt .descclassname { + padding: 0; + background: transparent; + border-bottom: 1px solid #111; +} + +dt .descclassname { + margin-left: 2px; +} + +dl dt big { + font-size: 100%; +} + +ul.search { + margin: 10px 0 0 30px; + padding: 0; +} + +ul.search li { + margin: 10px 0 0 0; + padding: 0; +} + +ul.search div.context { + font-size: 12px; + padding: 4px 0 0 20px; + color: #888; +} + +span.highlight { + background-color: #eee; + border: 1px solid #ccc; +} + +#toc { + margin: 0 -17px 0 -17px; + display: none; +} + +#toc h3 { + float: right; + margin: 5px 5px 0 0; + padding: 0; + font-size: 12px; + color: #777; +} + +#toc h3:hover { + color: #333; + cursor: pointer; +} + +.expandedtoc { + background: #222 url(darkmetal.png); + border-bottom: 1px solid #111; + outline-bottom: 1px solid #000; + padding: 5px; +} + +.expandedtoc h3 { + color: #aaa; + margin: 0!important; +} + +.expandedtoc h3:hover { + color: white!important; +} + +#tod h3:hover { + color: white; +} + +#toc a { + color: #ddd; + text-decoration: none; +} + +#toc a:hover { + color: white; + text-decoration: underline; +} + +#toc ul { + margin: 5px 0 12px 17px; + padding: 0 7px 0 7px; +} + +#toc ul ul { + margin-bottom: 0; +} + +#toc ul li { + margin: 2px 0 0 0; +} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_templates/.ignore ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_templates/.ignore b/ambari-common/src/main/python/jinja2/docs/_templates/.ignore new file mode 100644 index 0000000..e69de29 http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_templates/genindex.html ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_templates/genindex.html b/ambari-common/src/main/python/jinja2/docs/_templates/genindex.html new file mode 100644 index 0000000..9add6e9 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/_templates/genindex.html @@ -0,0 +1,36 @@ +{% extends "layout.html" %} +{% set title = 'Index' %} +{% block body %} + +

Index

+ + {% for key, dummy in genindexentries -%} + {{ key }} {% if not loop.last %}| {% endif %} + {%- endfor %} +
+ + {% for key, entries in genindexentries %} +

{{ key }}

+ + {%- for column in entries|slice(2) if column %} + + {%- endfor %} +
+ {%- for entryname, (links, subitems) in column %} +
{% if links %}{{ entryname|e }} + {% for link in links[1:] %}, [Link]{% endfor %} + {%- else %}{{ entryname|e }}{% endif %}
+ {%- if subitems %} +
+ {%- for subentryname, subentrylinks in subitems %} +
{{ subentryname|e }} + {%- for link in subentrylinks[1:] %}, [Link]{% endfor -%} +
+ {%- endfor %} +
+ {%- endif -%} + {%- endfor %} +
+ {% endfor %} + +{% endblock %} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_templates/layout.html ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_templates/layout.html b/ambari-common/src/main/python/jinja2/docs/_templates/layout.html new file mode 100644 index 0000000..f682f90 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/_templates/layout.html @@ -0,0 +1,77 @@ + + + + Jinja2 Documentation + + + + + {%- if builder != 'htmlhelp' %} + + + + + + {%- endif %} + {%- if use_opensearch and builder != 'htmlhelp' %} + + {%- endif %} + {%- if hasdoc('about') %} + + {%- endif %} + + + + {%- if hasdoc('copyright') %} + + {%- endif %} + + {%- if parents %} + + {%- endif %} + {%- if next %} + + {%- endif %} + {%- if prev %} + + {%- endif %} + {% block extrahead %}{% endblock %} + + +
+
+

Jinja

+
+
+ {%- if prev %} + « {{ prev.title }} | + {%- endif %} + {{ title }} + {%- if next %} + | {{ next.title }} » + {%- endif %} +
+
+ {%- if display_toc %} +
+

Table Of Contents

+ {{ toc }} +
+ {%- endif %} + {% block body %}{% endblock %} +
+
+ + + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_templates/opensearch.xml ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_templates/opensearch.xml b/ambari-common/src/main/python/jinja2/docs/_templates/opensearch.xml new file mode 100644 index 0000000..9f2fa42 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/_templates/opensearch.xml @@ -0,0 +1,9 @@ + + + {{ project }} + Search {{ docstitle }} + utf-8 + + {{ docstitle }} + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_templates/page.html ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_templates/page.html b/ambari-common/src/main/python/jinja2/docs/_templates/page.html new file mode 100644 index 0000000..ee6cad3 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/_templates/page.html @@ -0,0 +1,4 @@ +{% extends 'layout.html' %} +{% block body %} + {{ body }} +{% endblock %} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f0733293/ambari-common/src/main/python/jinja2/docs/_templates/search.html ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/jinja2/docs/_templates/search.html b/ambari-common/src/main/python/jinja2/docs/_templates/search.html new file mode 100644 index 0000000..0c942b7 --- /dev/null +++ b/ambari-common/src/main/python/jinja2/docs/_templates/search.html @@ -0,0 +1,35 @@ +{% extends "layout.html" %} +{% set title = 'Search' %} +{% block extrahead %} + +{% endblock %} +{% block body %} +

Search

+

+ From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing less words won't appear in the result list. +

+

+ + +

+ {% if search_performed %} +

Search Results

+ {% if not search_results %} +

Your search did not match any results.

+ {% endif %} + {% endif %} +
+ {% if search_results %} +
    + {% for href, caption, context in search_results %} +
  • {{ caption }} +
    {{ context|e }}
    +
  • + {% endfor %} +
+ {% endif %} +
+{% endblock %}