Skip to content
Myr

Merge branch '1.1.x'

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

authored by David Lord · committed by David Lord · parents b7f6fae, 02cfee8 · Browse files · 2 files+5 added−3 removed
This commit

State

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

Diff stats

2 files+5 added−3 removed

  • other:+5 added−3 removed

2 files+5 added−3 removed

modified:docs/patterns/urlprocessors.rst+2 added-2 removed
37 unmodified lines
38generate URLs from one function to another you would have to still provide39the language code explicitly which can be annoying.4041For the latter, this is where :func:`~flask.Flask.url_defaults` functions42come in. They can automatically inject values into a call for43:func:`~flask.url_for` automatically. The code below checks if the42come in. They can automatically inject values into a call to43:func:`~flask.url_for`. The code below checks if the44language code is not yet in the dictionary of URL values and if the45endpoint wants a value named ``'lang_code'``::4647 @app.url_defaults
79 unmodified lines
modified:docs/conf.py+3 added-1 removed
1import packaging23from pallets_sphinx_themes import get_version4from pallets_sphinx_themes import ProjectLink56# Project --------------------------------------------------------------
68 unmodified lines
75 words = words.strip()76 else:77 words = None7877 if release.endswith("dev"):79 if packaging.version.parse(release).is_devrelease:80 url = "{0}master/{1}".format(base_url, text)81 else:82 url = "{0}{1}/{2}".format(base_url, release, text)83
14 unmodified lines