标签:
样例,为下一步自定义用户权限作一下代码准备:
def get_context_data(self, **kwargs): if self.request.user.is_authenticated(): current_user_set = self.request.user print current_user_set current_group_set = Group.objects.get(user=current_user_set) print current_group_set print current_user_set.get_group_permissions() context = super(DeployVersionListView, self).get_context_data(**kwargs)
标签:
原文地址:http://www.cnblogs.com/aguncn/p/4908581.html