Globals¶
In addition to Jinja2’s built-in globals, Betty provides the following:
app(betty.app.App)The currently running Betty application.
citer(betty.document.Citer)The ledger of citation references on the current page.
breadcrumbs(betty.document.Breadcrumbs)The ledger of breadcrumbs on the current page.
entity_contexts(betty.document.EntityContexts)The ledger of primary entities in the current template context.
generate_html_id(betty.html.generate_html_id())A function to generate a HTML ID unique within the current render call, such as a page.
localizer(betty.locale.localize.Localizer)The localizer for the current template context.
new_attributes(betty.html.attributes.Attributes)Create new attributes for an HTML element.
project(betty.project.Project)The project the template is being rendered for.
public_css_paths(a sequence ofstr)The paths to the public CSS files used for all pages.
public_js_paths(a sequence ofstr)The paths to the public JS files used for all pages.
today(betty.date.Date)The current date.