def update_objects_permissions(): """ update all the contents permissions """ models = BaseContent.get_subclasses() for model in models: print 'Updating model: %s' % model queryset = model.objects.all() update_queryset_permissions(queryset)
def queryset(self, request, basecontent=None): # Ugly hack to quickly extract non related content types if request.GET.get('id__isnull', None) == 'false': return ContentType.objects.exclude(workflowmodelrelation__workflow=self.basecontent) else: models = [BaseContent] + BaseContent.get_subclasses() return ContentType.objects.filter(model__in=[model._meta.module_name for model in models])
def queryset(self, request, basecontent=None): # Ugly hack to quickly extract non related content types if request.GET.get('id__isnull', None) == 'false': return ContentType.objects.exclude( workflowmodelrelation__workflow=self.basecontent) else: models = [BaseContent] + BaseContent.get_subclasses() return ContentType.objects.filter( model__in=[model._meta.module_name for model in models])