样例,为下一步自定义用户权限作一下代码准备:
def get_context_data(self, **kwargs):if self.request.user.is_authenticated():current_user_set = self.request.userprint current_user_setcurrent_group_set = Group.objects.get(user=current_user_set)print current_group_setprint current_user_set.get_group_permissions()context = super(DeployVersionListView, self).get_context_data(**kwargs)