|
45 | 45 | from .helpers import get_flashed_messages |
46 | 46 | from .helpers import get_load_dotenv |
47 | 47 | from .helpers import locked_cached_property |
48 | | -from .helpers import url_for |
49 | 48 | from .json import jsonify |
50 | 49 | from .logging import create_logger |
51 | 50 | from .scaffold import _endpoint_from_view_func |
@@ -439,6 +438,7 @@ def __init__( |
439 | 438 | #: to raise HTTP errors, and can be called directly as well. |
440 | 439 | #: |
441 | 440 | #: .. versionadded:: 2.2 |
| 441 | + #: Moved from ``flask.abort``, which calls this object. |
442 | 442 | self.aborter = self.make_aborter() |
443 | 443 |
|
444 | 444 | #: A list of functions that are called by |
@@ -727,7 +727,7 @@ def create_jinja_environment(self) -> Environment: |
727 | 727 |
|
728 | 728 | rv = self.jinja_environment(self, **options) |
729 | 729 | rv.globals.update( |
730 | | - url_for=url_for, |
| 730 | + url_for=self.url_for, |
731 | 731 | get_flashed_messages=get_flashed_messages, |
732 | 732 | config=self.config, |
733 | 733 | # request, session and g are normally added with the |
@@ -1798,6 +1798,7 @@ def redirect(self, location: str, code: int = 302) -> BaseResponse: |
1798 | 1798 | :param code: The status code for the redirect. |
1799 | 1799 |
|
1800 | 1800 | .. versionadded:: 2.2 |
| 1801 | + Moved from ``flask.redirect``, which calls this method. |
1801 | 1802 | """ |
1802 | 1803 | return _wz_redirect(location, code=code, Response=self.response_class) |
1803 | 1804 |
|
|
0 commit comments