Skip to main content

render_negotiated

Function render_negotiated 

Source
pub async fn render_negotiated(
    t: &Tenant,
    tera: &Tera,
    page: &Page,
    url_prefix: &str,
    site_prefix: &str,
    locale_code: Option<&str>,
    viewer: Option<&User>,
    accept: Accept,
    cache: Option<(&BoxedCache, Duration)>,
) -> Response
Expand description

render, plus the client’s media-type preference.

Only page types that opt into a JSON view read accept at all — see crate::page_view. render is the Accept::Html case and stays source-compatible for every existing caller, including the admin’s own preview route.