context must be a dict rather than Context

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了context must be a dict rather than Context相关的知识,希望对你有一定的参考价值。

render_to_string() got an unexpected keyword argument ‘context_instance‘

context must be a dict rather than RequestContext
解决办法:

返回的context应该是字典
context = {‘booklist‘: booklist}

以上是关于context must be a dict rather than Context的主要内容,如果未能解决你的问题,请参考以下文章

在Django中template遇到 "context must be a dict rather

TypeError: the JSON object must be str, bytes or bytearray, not dict

tomcat 7 WARNING: A context path must either be an empty string or start with a '/' and do n

TypeError: string indices must be integers, not str

使用jinjia2时报错 (admin.E403) A ‘django.template.backends.django.DjangoTemplates’ instance must be confi

django通用视图Generic detail view PublisherList must be called with either an object pk or a slug