Architecture of a Runique Project

Tera Tags and Filters

Django-like Tags (syntactic sugar)

TagTransformed intoDescription
{% static "..." %}{{ "..." | static }}Static file URL
{% media "..." %}{{ "..." | media }}Media file URL
{% csrf %}{% include "csrf/..." %}Hidden CSRF field
{% messages %}{% include "message/..." %}Display flash messages
{% csp_nonce %}{% include "csp/..." %}CSP nonce attribute
{% link "name" %}{{ link(link='name') }}Named route URL
{% form.xxx %}{{ xxx | form | safe }}Full form rendering
{% form.xxx.field %}{{ xxx | form(field='field') | safe }}Single field rendering

Tera Filters

FilterDescription
staticApp static URL prefix
mediaApp media URL prefix
formRender full form or specific field
csrf_fieldGenerate a hidden CSRF input

Tera Functions

FunctionDescription
csrf()Generate a CSRF field from context
nonce()Return the CSP nonce
link(link='...')Named URL resolution