filters
trestle.core.jinja.filters
¤
Trestle utilities to customize jinja filters.
Attributes¤
logger = logging.getLogger(__name__)
module-attribute
¤
Classes¤
JinjaSSPFilters
¤
Bases: TrestleJinjaExtension
Collection of useful OSCAL-specific filters.
Source code in trestle/core/jinja/filters.py
64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
Functions¤
__init__(environment)
¤
Initialize class and add filters.
Source code in trestle/core/jinja/filters.py
67 68 69 70 71 72 73 74 75 76 |
|
Functions¤
diagram_href(diagram)
¤
Retrieve the diagrams's link href.
Source code in trestle/core/jinja/filters.py
56 57 58 59 60 61 |
|
first_or_none(value)
¤
Retrieve the first array entry, or None for lists that are None or empty.
Source code in trestle/core/jinja/filters.py
30 31 32 |
|
get_party(uuid, ssp)
¤
Get the metadata.parties entry for this UUID.
Source code in trestle/core/jinja/filters.py
35 36 37 |
|
parties_for_role(responsible_parties, role_id, ssp)
¤
Get a list of parties from a list of responsible_parties and a given role_id.
Source code in trestle/core/jinja/filters.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
handler: python