'元组'对象没有属性' get_default_prefix'

时间:2015-05-18 12:50:27

标签: python django postgresql

我在一个未完成的应用程序上工作,我没有自己开发。我收到这个错误:

'tuple' object has no attribute 'get_default_prefix'

去核实有关行:

for FormSet, inline in zip(self.get_formsets_with_inlines(request, obj), inline_instances):
     prefix = FormSet.get_default_prefix() # <---- It seems That the error comes from this line
     prefixes[prefix] = prefixes.get(prefix, 0) + 1

请问有什么问题?我使用Django 1.7。

1 个答案:

答案 0 :(得分:0)

您已尝试通过将get_formsets()更改为get_formsets_with_inlines()来修复 removeInDjango9 警告,但遗憾的是导致此错误。

相关问题