nodes.append(loader.render_to_string('xadmin/blocks/erpaddbookmarks.html', context=context))
# 报错
# context must be a dict rather than Context.

# 解决方法
nodes.append(loader.render_to_string('xadmin/blocks/erpaddbookmarks.html', context=context.flatten()))

 

相关文章: