[英]AttributeError at /edit/ 'RequestContext' object has no attribute 'flatten' (Django 1.6.7)
I have working project on Django 1.7 and now I had to downgrade Django version to 1.6.7. 我在Django 1.7上有工作项目,现在我不得不将Django版本降级到1.6.7。 Now all seems work ok except one page where I get above mentioned error.
现在似乎一切正常,除了一页出现上述错误的页面。 The issue traceback pointed to crispy-forms and it exactly due to django version because as soon as I upgrade to django==1.7 all works again.
该问题的回溯指向了脆皮形式,而这恰恰是由于django版本所致,因为一旦我升级到django == 1.7,所有这些都将再次起作用。 Anybody knows how to solve the problem?
有人知道如何解决问题吗? Thanks in advance.
提前致谢。
It seems like the flatten property was introduced to the Context object in the version Django==1.7. 似乎flatten属性是在Django == 1.7版本中引入到Context对象的。
https://docs.djangoproject.com/en/1.7/ref/templates/api/#django.template.Context.flatten https://docs.djangoproject.com/zh-CN/1.7/ref/templates/api/#django.template.Context.flatten
You may need to downgrade your django-crispy-forms version. 您可能需要降级django-crispy-forms版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.