Merge branch 'master' into sprint-branch
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Armin Ronacher · committed by Armin Ronacher · parents e2fc874, b9c76fb · Browse files · 5 files·+7 added−7 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+7 added−7 removed
- other:+7 added−7 removed
Provenance
- Commit
4cd6e9a- Tree
2588c0e- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent 1
e2fc874- Parent 2
b9c76fb
5 files changed+7 added−7 removed
modified:docs/faq.rst+1 added-1 removed
172 unmodified lines173 harder to maintain the code for older Python versions. If you really need174 Python 2.3 support you either have to use `Jinja 1`_ or other templating175 engines that still support 2.3.176 177-My Macros are overriden by something177+My Macros are overridden by something178 ------------------------------------179 180 In some situations the Jinja scoping appears arbitrary:181 22 unmodified linesmodified:docs/templates.rst+1 added-1 removed
860 unmodified lines861 <dd>{{ input_field('password', type='password') }}</dd>862 </dl>863 <p>{{ textarea('comment') }}</p>864 865-Macros and variables starting with one ore more underscores are private and865+Macros and variables starting with one or more underscores are private and866 cannot be imported.867 868 .. versionchanged:: 2.4869 If a template object was passed to the template context you can512 unmodified linesmodified:ext/django2jinja/django2jinja.py+1 added-1 removed
607 unmodified lines608 609 @node(core_tags.WithNode)610 def with_block(writer, node):611 writer.warn('with block expanded into set statement. This could cause '612- 'variables following that block to be overriden.', node)612+ 'variables following that block to be overridden.', node)613 writer.start_block()614 writer.write('set %s = ' % node.name)615 writer.node(node.var)616 writer.end_block()152 unmodified linesmodified:jinja2/compiler.py+3 added-3 removed
663 unmodified lines664 # assertion error. Reason: we can't generate reasonable code from665 # it without aliasing all the variables.666 # this could be fixed in Python 3 where we have the nonlocal667 # keyword or if we switch to bytecode generation668- overriden_closure_vars = (668+ overridden_closure_vars = (669 func_frame.identifiers.undeclared &670 func_frame.identifiers.declared &671 (func_frame.identifiers.declared_locally |672 func_frame.identifiers.declared_parameter)673 )674- if overriden_closure_vars:674+ if overridden_closure_vars:675 self.fail('It\'s not possible to set and access variables '676 'derived from an outer scope! (affects: %s)' %677- ', '.join(sorted(overriden_closure_vars)), node.lineno)677+ ', '.join(sorted(overridden_closure_vars)), node.lineno)678 679 # remove variables from a closure from the frame's undeclared680 # identifiers.681 func_frame.identifiers.undeclared -= (961 unmodified linesmodified:jinja2/sandbox.py+1 added-1 removed
113 unmodified lines114 def is_internal_attribute(obj, attr):115 """Test if the attribute given is an internal python attribute. For116 example this function returns `True` for the `func_code` attribute of117 python objects. This is useful if the environment method118- :meth:`~SandboxedEnvironment.is_safe_attribute` is overriden.118+ :meth:`~SandboxedEnvironment.is_safe_attribute` is overridden.119 120 >>> from jinja2.sandbox import is_internal_attribute121 >>> is_internal_attribute(lambda: None, "func_code")122 True240 unmodified lines