From: Armin Ronacher Date: Tue, 6 May 2008 14:54:22 +0000 (+0200) Subject: Indented environment parameters in docstring so that the sphinx HTML output looks... X-Git-Tag: 2.0rc1~87 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7b5680c3e3f3a3faf31f91ee3ab292da3b689ad0;p=jinja2.git Indented environment parameters in docstring so that the sphinx HTML output looks nicer --HG-- branch : trunk --- diff --git a/docs/_static/style.css b/docs/_static/style.css index 38af5c8..41877f7 100644 --- a/docs/_static/style.css +++ b/docs/_static/style.css @@ -137,6 +137,10 @@ p, li, dd, dt, blockquote { color: #333; } +blockquote { + margin: 10px 0 10px 20px; +} + p { line-height: 20px; margin-bottom: 0; diff --git a/jinja2/environment.py b/jinja2/environment.py index 35bbb15..92ab578 100644 --- a/jinja2/environment.py +++ b/jinja2/environment.py @@ -82,67 +82,69 @@ class Environment(object): Here the possible initialization parameters: - `block_start_string` - The string marking the begin of a block. Defaults to ``'{%'``. + `block_start_string` + The string marking the begin of a block. Defaults to ``'{%'``. - `block_end_string` - The string marking the end of a block. Defaults to ``'%}'``. + `block_end_string` + The string marking the end of a block. Defaults to ``'%}'``. - `variable_start_string` - The string marking the begin of a print statement. - Defaults to ``'{{'``. + `variable_start_string` + The string marking the begin of a print statement. + Defaults to ``'{{'``. - `variable_stop_string` - The string marking the end of a print statement. Defaults to ``'}}'``. + `variable_stop_string` + The string marking the end of a print statement. Defaults to + ``'}}'``. - `comment_start_string` - The string marking the begin of a comment. Defaults to ``'{#'``. + `comment_start_string` + The string marking the begin of a comment. Defaults to ``'{#'``. - `comment_end_string` - The string marking the end of a comment. Defaults to ``'#}'``. + `comment_end_string` + The string marking the end of a comment. Defaults to ``'#}'``. - `line_statement_prefix` - If given and a string, this will be used as prefix for line based - statements. See also :ref:`line-statements`. + `line_statement_prefix` + If given and a string, this will be used as prefix for line based + statements. See also :ref:`line-statements`. - `trim_blocks` - If this is set to ``True`` the first newline after a block is - removed (block, not variable tag!). Defaults to `False`. + `trim_blocks` + If this is set to ``True`` the first newline after a block is + removed (block, not variable tag!). Defaults to `False`. - `extensions` - List of Jinja extensions to use. This can either be import paths - as strings or extension classes. + `extensions` + List of Jinja extensions to use. This can either be import paths + as strings or extension classes. - `optimized` - should the optimizer be enabled? Default is `True`. + `optimized` + should the optimizer be enabled? Default is `True`. - `undefined` - :class:`Undefined` or a subclass of it that is used to represent - undefined values in the template. + `undefined` + :class:`Undefined` or a subclass of it that is used to represent + undefined values in the template. - `finalize` - A callable that finalizes the variable. Per default no finalizing - is applied. + `finalize` + A callable that finalizes the variable. Per default no finalizing + is applied. - `autoescape` - If set to true the XML/HTML autoescaping feature is enabled. + `autoescape` + If set to true the XML/HTML autoescaping feature is enabled. - `loader` - The template loader for this environment. + `loader` + The template loader for this environment. - `cache_size` - The size of the cache. Per default this is ``50`` which means that if - more than 50 templates are loaded the loader will clean out the least - recently used template. If the cache size is set to ``0`` templates are - recompiled all the time, if the cache size is ``-1`` the cache will not - be cleaned. + `cache_size` + The size of the cache. Per default this is ``50`` which means + that if more than 50 templates are loaded the loader will clean + out the least recently used template. If the cache size is set to + ``0`` templates are recompiled all the time, if the cache size is + ``-1`` the cache will not be cleaned. - `auto_reload` - Some loaders load templates from locations where the template sources - may change (ie: file system or database). If `auto_reload` is set to - `True` (default) every time a template is requested the loader checks - if the source changed and if yes, it will reload the template. For - higher performance it's possible to disable that. + `auto_reload` + Some loaders load templates from locations where the template + sources may change (ie: file system or database). If + `auto_reload` is set to `True` (default) every time a template is + requested the loader checks if the source changed and if yes, it + will reload the template. For higher performance it's possible to + disable that. """ #: if this environment is sandboxed. Modifying this variable won't make