ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class CsrfExtension(Extension): (source)

View In Hierarchy

Provide the {% csrf %} statement tag.

The tag is a zero-argument shortcut for {{ csrf_field() }}: it renders the hidden input holding the current CSRF token, so forms need no explicit call to the template global.

Async Method _renderField Render the hidden CSRF input through the csrf_field global.
Method parse Compile the {% csrf %} tag into an output node.
Class Variable tags Undocumented
async def _renderField(self) -> Markup: (source)

Render the hidden CSRF input through the csrf_field global.

Returns
MarkupSafe HTML markup with the hidden input.
Raises
ViewRenderExceptionWhen the csrf_field template global is not registered.
def parse(self, parser: Parser) -> nodes.Output: (source)

Compile the {% csrf %} tag into an output node.

Parameters
parser:ParserJinja2 parser positioned on the tag name token.
Returns
nodes.OutputNode emitting the hidden CSRF input at render time.
tags: ClassVar[set[str]] = (source)

Undocumented