【发布时间】:2012-12-21 17:20:10
【问题描述】:
我一直在使用找到here 的代码,它在django-admin 中部署的服务器上运行良好。服务器从 django (7cfe8e8fce) 的旧结帐运行。在我的本地机器上,我正在运行当前结帐 (d407164c)。尝试访问该表单时,我收到以下错误以及对 return 行的引用:
def _get_empty_form(self, **kwargs):
return super(ParentInstInlineFormSet, self)._get_empty_form(parent_instance=self.instance)
empty_form = property(_get_empty_form)
错误文本:
'super' object has no attribute '_get_empty_form'
Request Method: GET
Request URL: http://localhost:8000/pmc/admin/pmc_log/reportperiod/add/
Django Version: 1.6.dev20121220194515
Exception Type: AttributeError
Exception Value:
'super' object has no attribute '_get_empty_form'
Exception Location: /software/django-pmc-daily-log/src/pmc_log/pmc_log/forms.py in _get_empty_form, line 18
_get_empty_form 去哪儿了?最好的解决方法是什么?
【问题讨论】:
标签: django django-forms django-admin