简体   繁体   English

/ edit /'RequestContext'对象处的AttributeError没有属性'flatten'(Django 1.6.7)

[英]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.

相关问题 AttributeError:'RequestContext'对象没有属性'user' - AttributeError: 'RequestContext' object has no attribute 'user' AttributeError: 'Flatten' object 没有属性 'shape' - AttributeError: 'Flatten' object has no attribute 'shape' django-threadedcomments:'RequestContext'对象没有属性'META' - django-threadedcomments: 'RequestContext' object has no attribute 'META' Django:AttributeError-对象没有属性 - Django: AttributeError - Object has no attribute Django:AttributeError:“对象没有属性” - Django: AttributeError: “Object has no attribute” AttributeError: 'coroutine' 对象没有属性 'edit' - AttributeError: 'coroutine' object has no attribute 'edit' AttributeError: 'NoneType' object 没有属性 'edit' - AttributeError: 'NoneType' object has no attribute 'edit' Python / Flask:AttributeError:'RequestContext'object没有属性'login'(分配给会话时['username']) - Python/Flask: AttributeError: 'RequestContext' object has no attribute 'login' (when assigning to session['username']) 展平调整大小的图像 - AttributeError: 'Image' object 没有属性 'flatten' - Flattening a resized image - AttributeError: 'Image' object has no attribute 'flatten' CBV对象的Django AttributeError没有属性'object' - Django AttributeError for CBV object has no attribute 'object'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM