content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
queryset=autocomplete.QuerySetSequence(
Article.objects.all(),
- CustomPage.objects.all(),
- TeamPage.objects.all(),
- Project.objects.all()
+ CustomPage.objects.all()
),
required=False,
widget=dal_select2_queryset_sequence.widgets.QuerySetSequenceSelect2('dynamic-content-event'),
articles = Article.objects.all()
custompage = CustomPage.objects.all()
events = Event.objects.all()
- teampages = TeamPage.objects.all()
- projects = Project.objects.all()
if self.q:
articles = articles.filter(title__icontains=self.q)
custompage = custompage.filter(title__icontains=self.q)
events = events.filter(title__icontains=self.q)
- teampages = teampages.filter(title__icontains=self.q)
- projects = projects.filter(title__icontains=self.q)
- qs = autocomplete.QuerySetSequence(articles, custompage, events, teampages, projects)
+ qs = autocomplete.QuerySetSequence(articles, custompage, events,)
if self.q:
# This would apply the filter on all the querysets