在Django的Paginate list mixin

时间:2014-11-20 16:12:56

标签: python django django-models django-views django-class-based-views

我有一个混音:

class GroupListMixin(object):
    def get_context_data(self, **kwargs):
        context = super(GroupListMixin, self).get_context_data(**kwargs)
        context['group_list'] = Group.objects.all()
        return context

我在许多其他视图中使用。我的问题是我要分页group_list

我尝试继承django.views.generic.list.BaseListView,但在'UserUpdateView' object has no attribute 'object'GroupListMixin合并后,我收到错误UserUpdateView

是否无法将BaseListView用作其他观点的混音?

0 个答案:

没有答案