add_app_template_filter() — flask Function Reference
Architecture documentation for the add_app_template_filter() function in blueprints.py from the flask codebase.
Entity Profile
Dependency Diagram
graph TD 0e94cea7_d7a3_238f_715d_5d59f6552fb2["add_app_template_filter()"] 0c59fa87_9a90_f011_4207_98ae96479921["Blueprint"] 0e94cea7_d7a3_238f_715d_5d59f6552fb2 -->|defined in| 0c59fa87_9a90_f011_4207_98ae96479921 4c021390_c775_df56_939c_c01853bde95a["app_template_filter()"] 4c021390_c775_df56_939c_c01853bde95a -->|calls| 0e94cea7_d7a3_238f_715d_5d59f6552fb2 0085606d_b5d3_d0dc_0155_6135d079c059["record_once()"] 0e94cea7_d7a3_238f_715d_5d59f6552fb2 -->|calls| 0085606d_b5d3_d0dc_0155_6135d079c059 1b64a668_0df0_1835_ae6f_a2c7930e568c["add_template_filter()"] 0e94cea7_d7a3_238f_715d_5d59f6552fb2 -->|calls| 1b64a668_0df0_1835_ae6f_a2c7930e568c style 0e94cea7_d7a3_238f_715d_5d59f6552fb2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/flask/sansio/blueprints.py lines 476–495
def add_app_template_filter(
self, f: ft.TemplateFilterCallable, name: str | None = None
) -> None:
"""Register a function to use as a custom Jinja filter.
The :meth:`app_template_filter` decorator can be used to register a
function by decorating instead.
The filter is available in all templates, not only those under this
blueprint. Equivalent to :meth:`.Flask.add_template_filter`.
:param f: The function to register.
:param name: The name to register the filter as. If not given, uses the
function's name.
"""
def register_template_filter(state: BlueprintSetupState) -> None:
state.app.add_template_filter(f, name=name)
self.record_once(register_template_filter)
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does add_app_template_filter() do?
add_app_template_filter() is a function in the flask codebase, defined in src/flask/sansio/blueprints.py.
Where is add_app_template_filter() defined?
add_app_template_filter() is defined in src/flask/sansio/blueprints.py at line 476.
What does add_app_template_filter() call?
add_app_template_filter() calls 2 function(s): add_template_filter, record_once.
What calls add_app_template_filter()?
add_app_template_filter() is called by 1 function(s): app_template_filter.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free