From ef434ea9985b756f13bed283dfa55828829e5e1f Mon Sep 17 00:00:00 2001 From: Grey Li Date: Fri, 15 Nov 2019 12:27:44 +0800 Subject: [PATCH] Replace old pocoo links everywhere pocco.org -> palletsprojects.com --- docs/conf.py | 2 +- docs/index.rst | 2 +- docs/quickstart.rst | 4 ++-- docs/templating.rst | 2 +- docs/tutorial/blog.rst | 2 +- docs/tutorial/templates.rst | 2 +- examples/javascript/README.rst | 2 +- examples/javascript/setup.py | 2 +- examples/tutorial/README.rst | 2 +- examples/tutorial/setup.py | 2 +- src/flask/debughelpers.py | 2 +- tests/test_templating.py | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 39e56a8f..b261b063 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,7 +23,7 @@ intersphinx_mapping = { "python": ("https://docs.python.org/3/", None), "werkzeug": ("https://werkzeug.palletsprojects.com/", None), "click": ("https://click.palletsprojects.com/", None), - "jinja": ("http://jinja.pocoo.org/docs/", None), + "jinja": ("https://jinja.palletsprojects.com/", None), "itsdangerous": ("https://itsdangerous.palletsprojects.com/", None), "sqlalchemy": ("https://docs.sqlalchemy.org/", None), "wtforms": ("https://wtforms.readthedocs.io/en/stable/", None), diff --git a/docs/index.rst b/docs/index.rst index e768da3e..e8e94e4e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -20,7 +20,7 @@ Flask in detail, with a full reference in the :ref:`api` section. Flask depends on the `Jinja`_ template engine and the `Werkzeug`_ WSGI toolkit. The documentation for these libraries can be found at: -- `Jinja documentation `_ +- `Jinja documentation `_ - `Werkzeug documentation `_ .. _Jinja: https://www.palletsprojects.com/p/jinja/ diff --git a/docs/quickstart.rst b/docs/quickstart.rst index b90d5e39..d468378f 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -359,7 +359,7 @@ Rendering Templates Generating HTML from within Python is not fun, and actually pretty cumbersome because you have to do the HTML escaping on your own to keep the application secure. Because of that Flask configures the `Jinja2 -`_ template engine for you automatically. +`_ template engine for you automatically. To render a template you can use the :func:`~flask.render_template` method. All you have to do is provide the name of the template and the @@ -392,7 +392,7 @@ package it's actually inside your package: For templates you can use the full power of Jinja2 templates. Head over to the official `Jinja2 Template Documentation -`_ for more information. +`_ for more information. Here is an example template: diff --git a/docs/templating.rst b/docs/templating.rst index 3fa7a066..74c6ad7c 100644 --- a/docs/templating.rst +++ b/docs/templating.rst @@ -11,7 +11,7 @@ An extension can depend on Jinja2 being present. This section only gives a very quick introduction into how Jinja2 is integrated into Flask. If you want information on the template engine's syntax itself, head over to the official `Jinja2 Template -Documentation `_ for +Documentation `_ for more information. Jinja Setup diff --git a/docs/tutorial/blog.rst b/docs/tutorial/blog.rst index 18eac193..82dcc957 100644 --- a/docs/tutorial/blog.rst +++ b/docs/tutorial/blog.rst @@ -125,7 +125,7 @@ special variable available inside `Jinja for loops`_. It's used to display a line after each post except the last one, to visually separate them. -.. _Jinja for loops: http://jinja.pocoo.org/docs/templates/#for +.. _Jinja for loops: https://jinja.palletsprojects.com/templates/#for Create diff --git a/docs/tutorial/templates.rst b/docs/tutorial/templates.rst index 7baa8ebc..1a5535cc 100644 --- a/docs/tutorial/templates.rst +++ b/docs/tutorial/templates.rst @@ -31,7 +31,7 @@ statement like ``if`` and ``for``. Unlike Python, blocks are denoted by start and end tags rather than indentation since static text within a block could change indentation. -.. _Jinja: http://jinja.pocoo.org/docs/templates/ +.. _Jinja: https://jinja.palletsprojects.com/templates/ .. _HTML: https://developer.mozilla.org/docs/Web/HTML diff --git a/examples/javascript/README.rst b/examples/javascript/README.rst index b284d3c9..b25bdb4e 100644 --- a/examples/javascript/README.rst +++ b/examples/javascript/README.rst @@ -15,7 +15,7 @@ page. Demonstrates using |XMLHttpRequest|_, |fetch|_, and .. |jQuery.ajax| replace:: ``jQuery.ajax`` .. _jQuery.ajax: https://api.jquery.com/jQuery.ajax/ -.. _Flask docs: http://flask.pocoo.org/docs/patterns/jquery/ +.. _Flask docs: https://flask.palletsprojects.com/patterns/jquery/ Install diff --git a/examples/javascript/setup.py b/examples/javascript/setup.py index 93f28db2..e118d980 100644 --- a/examples/javascript/setup.py +++ b/examples/javascript/setup.py @@ -9,7 +9,7 @@ with io.open("README.rst", "rt", encoding="utf8") as f: setup( name="js_example", version="1.0.0", - url="http://flask.pocoo.org/docs/patterns/jquery/", + url="https://flask.palletsprojects.com/patterns/jquery/", license="BSD", maintainer="Pallets team", maintainer_email="contact@palletsprojects.com", diff --git a/examples/tutorial/README.rst b/examples/tutorial/README.rst index 237b0ba7..7c7255f9 100644 --- a/examples/tutorial/README.rst +++ b/examples/tutorial/README.rst @@ -3,7 +3,7 @@ Flaskr The basic blog app built in the Flask `tutorial`_. -.. _tutorial: http://flask.pocoo.org/docs/tutorial/ +.. _tutorial: https://flask.palletsprojects.com/tutorial/ Install diff --git a/examples/tutorial/setup.py b/examples/tutorial/setup.py index 01bf7976..3c8f4116 100644 --- a/examples/tutorial/setup.py +++ b/examples/tutorial/setup.py @@ -9,7 +9,7 @@ with io.open("README.rst", "rt", encoding="utf8") as f: setup( name="flaskr", version="1.0.0", - url="http://flask.pocoo.org/docs/tutorial/", + url="https://flask.palletsprojects.com/tutorial/", license="BSD", maintainer="Pallets team", maintainer_email="contact@palletsprojects.com", diff --git a/src/flask/debughelpers.py b/src/flask/debughelpers.py index e475bd1a..7117d782 100644 --- a/src/flask/debughelpers.py +++ b/src/flask/debughelpers.py @@ -164,7 +164,7 @@ def explain_template_loading_attempts(app, template, attempts): 'belongs to the blueprint "%s".' % blueprint ) info.append(" Maybe you did not place a template in the right folder?") - info.append(" See http://flask.pocoo.org/docs/blueprints/#templates") + info.append(" See https://flask.palletsprojects.com/blueprints/#templates") app.logger.info("\n".join(info)) diff --git a/tests/test_templating.py b/tests/test_templating.py index c4bde8b1..4537516e 100644 --- a/tests/test_templating.py +++ b/tests/test_templating.py @@ -426,7 +426,7 @@ def test_template_loader_debugging(test_apps, monkeypatch): assert ( "looked up from an endpoint that belongs to " 'the blueprint "frontend"' ) in text - assert "See http://flask.pocoo.org/docs/blueprints/#templates" in text + assert "See https://flask.palletsprojects.com/blueprints/#templates" in text with app.test_client() as c: monkeypatch.setitem(app.config, "EXPLAIN_TEMPLATE_LOADING", True)