dj_angles.templatetags.call

Module Contents

dj_angles.templatetags.call.logger
dj_angles.templatetags.call.resolve(context, arg)

Resolves a template variable based on the context if it’s a TemplateVariable. Otherwise, evaluate the arg.

Parameters:
  • context (param) – The template context.

  • arg (param) – The variable to resolve.

Returns:

The resolved value of the variable.

class dj_angles.templatetags.call.CallNode(parsed_function, context_variable_name)

Bases: django.template.Node

parsed_function
context_variable_name
resolve_args(context, portion)
resolve_kwargs(context, portion)
get_result(context, obj, portion)
render(context)

Execute the function with the provided arguments and stores the results in context.

dj_angles.templatetags.call.do_call(parser, token) CallNode

Parses the token to get all the pieces needed to call the function.

Parameters:
  • parser – The template parser.

  • token – The token to parse.

Returns:

Handles running the function and storing the result in the context.

Return type:

CallNode