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.
machine_name(betty.machine_name.MachineName())Create new unique values that are valid as HTML IDs and classes.
localizer(betty.localizer.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.