Mixins

class terminusgps.mixins.HtmxTemplateResponseMixin[source]

Renders a partial HTML template depending on HTTP headers.

htmx documentation

Public Data Attributes:

partial_template_name

A partial template rendered by htmx.

Inherited from TemplateResponseMixin

template_name

template_engine

content_type

Public Methods:

render_to_response(context, **response_kwargs)

Return a response, using the response_class for this view, with a template rendered with the given context.

Inherited from TemplateResponseMixin

render_to_response(context, **response_kwargs)

Return a response, using the response_class for this view, with a template rendered with the given context.

get_template_names()

Return a list of template names to be used for the request.


partial_template_name: str | None = None

A partial template rendered by htmx.

Type:

str | None

Value:

None

render_to_response(context: dict[str, Any], **response_kwargs: Any) HttpResponse[source]

Return a response, using the response_class for this view, with a template rendered with the given context.

Pass response_kwargs to the constructor of the response class.