Filters - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# Filters

Jinja2 filters are like function calls, and specifically designed to transform data.

## Built-in filters

In addition to Jinja2’s built-in filters, Betty provides the following:

- `camel_case_to_kebab_case`

- `camel_case_to_snake_case`

- `file`

- `flatten`

- `format_datey`

- `format_degrees`

- `hashid`

- `image_resize_cover`

- `html_lang`

- `json`

- `locale_get_data`

- `localize`

- `localized_url` (deprecated)

- `map`

- `negotiate_has_dates`

- `negotiate_localizeds`

- `paragraphs`

- `public_css`

- `public_js`

- `select_has_dates`

- `select_localizeds`

- `static_url` (deprecated)

- `sort_localizeds`

- `str`

- `unique`

- `upper_camel_case_to_lower_camel_case`

- `url`