Returns queryset limited to categories with live Entry instances.

        :rtype: django.db.models.query.QuerySet.
974881
def get_queryset(self):
        
        queryset = super(LiveEntryCategoryManager, self).get_queryset()
        return queryset.filter(tag__in=[
            entry_tag.tag
            for entry_tag
            in EntryTag.objects.filter(entry__live=True)
        ])
540363
def get_queryset(self):
        
        try:
            qs = super(UserManager, self).get_queryset()
        except AttributeError:  # pragma: no cover
            qs = super(UserManager, self).get_query_set()
        return qs
1293639
def entries(self):
        
        # Since there is currently no filtering in place, return all entries.
        EntryModel = get_entry_model()
        qs = get_entry_model().objects.order_by('-publication_date')

        # Only limit to current language when this makes sense.
        if issubclass(EntryModel, TranslatableModel):
            admin_form_language = self.get_current_language()  # page object is in current language tab.
            qs = qs.active_translations(admin_form_language).language(admin_form_language)

        return qs
839476
def get_queryset(self):
        
        queryset = super(UpdateImageView, self).get_queryset()
        queryset = queryset.filter(user=self.user)
        return queryset
1342969
def get_queryset(self):
        ""
        qs = super().get_queryset()

        kind = self.get_event_kind()
        if kind is not None:
            qs = qs.filter(kind=kind)

        qs = qs.select_related('venue')

        return qs
568498
def build_filtered_queryset(self, query, **kwargs):
        
        # Take the basic queryset
        qs = self.get_queryset()
        # filter it via the query conditions
        qs = qs.filter(self.get_queryset_filters(query))
        return self.build_extra_filtered_queryset(qs, **kwargs)
386078
def query(self, model_cls):
        
        self._filters_cmd = list()
        self.query_filters = list()
        self._order_by_cmd = None
        self._offset = 0
        self._limit = 0
        self.query_class = model_cls._name
        return self
607044
def get_categories(self):
        
        posts = self.get_posts(include_draft=True)
        result = {}
        for post in posts:
            for category_name in set(post.categories):
                result[category_name] = result.setdefault(
                    category_name,
                    Pair(0, 0)) + Pair(1, 0 if post.is_draft else 1)
        return list(result.items())
1233383
def on_site(self):
        
        return super(EntryPublishedManager, self).get_queryset().filter(
            sites=Site.objects.get_current())
1234417
def get_queryset(self):
        '''
        
        '''
        request = self.request
        return (Languages.for_site(request.site)
                         .languages.filter().order_by('pk'))
1316933
def get_object(self, queryset=None):
        
        obj = super(EntryPreviewMixin, self).get_object(queryset)
        if obj.is_visible:
            return obj
        if (self.request.user.has_perm('zinnia.can_view_all') or
                self.request.user.pk in [
                author.pk for author in obj.authors.all()]):
            return obj
        raise Http404(_('No entry found matching the query'))
558100
def get_queryset(self, request):
        
        if request.GET.get(ShowHistoryFilter.parameter_name) == '1':
            queryset = self.model.objects.with_active_flag()
        else:
            # Show only the most recent row for each key.
            queryset = self.model.objects.current_set()
        ordering = self.get_ordering(request)
        if ordering:
            return queryset.order_by(*ordering)
        return queryset
276974
def get_queryset(self):
        
        if self.queryset is not None:
            queryset = self.queryset
            if hasattr(queryset, '_clone'):
                queryset = queryset._clone()
        elif self.model is not None:
            queryset = self.model._default_manager.all()
        else:
            msg = '{0} must define ``queryset`` or ``model``'
            raise ImproperlyConfigured(msg.format(self.__class__.__name__))
        return queryset
83369
def get_queryset(self):
        ''''''
        if self.action == 'list':
            active = get_true_false_both(
                self.request.query_params, 'active', 'true')
            if active == 'true':
                return self.queryset.filter(is_active=True)
            if active == 'false':
                return self.queryset.filter(is_active=False)
        return self.queryset
457019
def get_queryset(self):
        
        qs = super(FilterFormMixin, self).get_queryset()
        filter_form = self.get_filter()
        if filter_form.is_valid():
            qs = filter_form.filter(qs).distinct()
        return qs
700781
def get_queryset(self, *args, **kwargs):
        
        qs = super(AutoPrefetchMixin, self).get_queryset(*args, **kwargs)
        included_resources = get_included_resources(self.request)

        for included in included_resources:
            included_model = None
            levels = included.split('.')
            level_model = qs.model
            for level in levels:
                if not hasattr(level_model, level):
                    break
                field = getattr(level_model, level)
                field_class = field.__class__

                is_forward_relation = (
                    issubclass(field_class, ForwardManyToOneDescriptor) or
                    issubclass(field_class, ManyToManyDescriptor)
                )
                is_reverse_relation = (
                    issubclass(field_class, ReverseManyToOneDescriptor) or
                    issubclass(field_class, ReverseOneToOneDescriptor)
                )
                if not (is_forward_relation or is_reverse_relation):
                    break

                if level == levels[-1]:
                    included_model = field
                else:

                    if issubclass(field_class, ReverseOneToOneDescriptor):
                        model_field = field.related.field
                    else:
                        model_field = field.field

                    if is_forward_relation:
                        level_model = model_field.related_model
                    else:
                        level_model = model_field.model

            if included_model is not None:
                qs = qs.prefetch_related(included.replace('.', '__'))

        return qs
1125470
def get_queryset(self):
        
        qs = VersionedQuerySet(self.model, using=self._db)
        if hasattr(self, 'instance') and hasattr(self.instance, '_querytime'):
            qs.querytime = self.instance._querytime
        return qs