Skip to content
Myr

Some cleanups

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 · parent 51d7c8d · Browse files · 3 files+3 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+3 added−4 removed

  • other:+3 added−4 removed

3 files+3 added−4 removed

modified:flask/app.py+1 added-2 removed
1156 unmodified lines
1157 function name will be used.1158 """1159 self.jinja_env.tests[name or f.__name__] = f116011611161 @setupmethod1162 def template_global(self, name=None):1163 """A decorator that is used to register a custom template global function.1164 You can specify a name for the global function, otherwise the function
543 unmodified lines
1708 bp = _request_ctx_stack.top.request.blueprint1709 if bp is not None and bp in self.teardown_request_funcs:1710 funcs = chain(funcs, reversed(self.teardown_request_funcs[bp]))1711 for func in funcs:1713 rv = func(exc)1712 func(exc)1713 request_tearing_down.send(self, exc=exc)17141715 def do_teardown_appcontext(self, exc=None):1716 """Called when an application context is popped. This works pretty
124 unmodified lines
modified:flask/debughelpers.py+1 added-1 removed
76 unmodified lines
77 class newcls(oldcls):78 def __getitem__(self, key):79 try:80 return oldcls.__getitem__(self, key)81 except KeyError as e:81 except KeyError:82 if key not in request.form:83 raise84 raise DebugFilesKeyError(request, key)85 newcls.__name__ = oldcls.__name__
2 unmodified lines
modified:flask/json.py+1 added-1 removed
230 unmodified lines
231 .. versionadded:: 0.2232 """233 indent = None234 if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] \235 and not request.is_xhr:235 and not request.is_xhr:236 indent = 2237 return current_app.response_class(dumps(dict(*args, **kwargs),238 indent=indent),239 mimetype='application/json')
4 unmodified lines