2👍
✅
RenderContext
‘s base class, BaseContext
, has a function called flatten
which will take the array of dictionaries inside a Context object and return a single dictionary
render_to_string(svg_template_file_name, context, request=context.request)
would need changing to
render_to_string(svg_template_file_name, context.flatten(), request=context.request)
Source:stackexchange.com