TypeError:调用元类库时出错

时间:2017-09-22 22:00:09

标签: python django

TypeError: Error when calling the metaclass bases
    Cannot create a consistent method resolution
order (MRO) for bases StaffRestrictedMixin, StatisticsIndexView

我有这种类型的错误,但无论其他类似问题我都无法解决。

views.py

class StatisticsIndexView(StaffRestrictedMixin, TemplateView):
    model = Statistics()
    template_name = 'loanwolf/statistics/index.html'
    form = StatisticsBaseForm()

    def get_context_data(self, **kwargs):
        context = super(StatisticsIndexView, self).get_context_data(**kwargs)
        context.update({
            'applications_by_state': ApplicationsByState(),
            'applications_calendar': ApplicationsCalendar(),
            'new_customers_calendar': NewCustomersCalendar(),
            'statistics': Statistics(),
            'form': StatisticsBaseForm(),
        })
        return context

class StatisticsSubmitView(StaffRestrictedMixin, StatisticsIndexView):
    model = Statistics()

你有什么建议解决这个问题?

0 个答案:

没有答案