From d13a1b363e1065de98f44fe0446b570ce078007e Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sat, 6 Jun 2015 06:29:24 +0200 Subject: [PATCH] Rename jinja_env_class Inspired by #1056 --- flask/app.py | 4 ++-- tests/test_templating.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flask/app.py b/flask/app.py index fc1f5505..e260065b 100644 --- a/flask/app.py +++ b/flask/app.py @@ -160,7 +160,7 @@ class Flask(_PackageBoundObject): #: The class that is used for the Jinja environment. #: #: .. versionadded:: 1.0 - jinja_env_class = Environment + jinja_environment = Environment #: The class that is used for the :data:`~flask.g` instance. #: @@ -685,7 +685,7 @@ class Flask(_PackageBoundObject): options['auto_reload'] = self.config['TEMPLATES_AUTO_RELOAD'] else: options['auto_reload'] = self.debug - rv = self.jinja_env_class(self, **options) + rv = self.jinja_environment(self, **options) rv.globals.update( url_for=url_for, get_flashed_messages=get_flashed_messages, diff --git a/tests/test_templating.py b/tests/test_templating.py index 132f42a4..293ca06f 100644 --- a/tests/test_templating.py +++ b/tests/test_templating.py @@ -367,7 +367,7 @@ def test_custom_jinja_env(): pass class CustomFlask(flask.Flask): - jinja_env_class = CustomEnvironment + jinja_environment = CustomEnvironment app = CustomFlask(__name__) assert isinstance(app.jinja_env, CustomEnvironment)