MCPcopy
hub / github.com/pallets/flask / add_language_code

Function add_language_code

tests/test_basic.py:1639–1643  ·  view source on GitHub ↗
(endpoint, values)

Source from the content-addressed store, hash-verified

1637def test_url_processors(app, client):
1638 @app.url_defaults
1639 def add_language_code(endpoint, values):
1640 if flask.g.lang_code is not None and app.url_map.is_endpoint_expecting(
1641 endpoint, "lang_code"
1642 ):
1643 values.setdefault("lang_code", flask.g.lang_code)
1644
1645 @app.url_value_preprocessor
1646 def pull_lang_code(endpoint, values):

Callers

nothing calls this directly

Calls 1

setdefaultMethod · 0.80

Tested by

no test coverage detected