get_iframe#

String.get_iframe(width: int | float = 0, height: int | float = 0, *, context=None, request=None) → str#

Return an inline iframe containing the rendered item.

Parameters:
widthint or float, optional

Iframe width. By default, image width is used up to 1000 pixels, or 1000 pixels for other item types.

heightint or float, optional

Iframe height. By default, image height is used up to 400 pixels. Scenes default to 800 pixels and other item types to 400 pixels.

contextdict or None, optional

Context dictionary passed to render().

requestHttpRequest or None, optional

Django request object passed to render(), if available.

Returns:
str

String-like iframe markup that rich display frontends render as HTML.