from mezzanine.core.models import Orderable
from organization.magazine.models import Article, Topic, Brief
from organization.pages.models import CustomPage
-from mezzanine_agenda.models import Event
+# from mezzanine_agenda.models import Event
from organization.pages.models import DynamicContentHomeSlider, DynamicContentHomeBody
class DynamicContentHomeSliderForm(autocomplete.FutureModelForm):
content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
queryset=autocomplete.QuerySetSequence(
Article.objects.all(),
- Event.objects.all(),
+ # Event.objects.all(),
CustomPage.objects.all(),
),
required=False,
content_object = dal_queryset_sequence.fields.QuerySetSequenceModelField(
queryset=autocomplete.QuerySetSequence(
Article.objects.all(),
- Event.objects.all(),
+ # Event.objects.all(),
CustomPage.objects.all(),
Brief.objects.all(),
),
from django.views.generic import DetailView, ListView, TemplateView
from dal import autocomplete
from dal_select2_queryset_sequence.views import Select2QuerySetSequenceView
-from mezzanine_agenda.models import Event
+# from mezzanine_agenda.models import Event
from organization.pages.models import CustomPage
from organization.core.views import SlugMixin
from organization.magazine.models import Article, Topic, Brief
articles = Article.objects.all()
custompage = CustomPage.objects.all()
- events = Event.objects.all()
+ # events = Event.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)
+ # events = events.filter(title__icontains=self.q)
- qs = autocomplete.QuerySetSequence(articles, custompage, events )
+ qs = autocomplete.QuerySetSequence(articles, custompage ) #, events
if self.q:
# This would apply the filter on all the querysets
articles = Article.objects.all()
custompage = CustomPage.objects.all()
- events = Event.objects.all()
+ # events = Event.objects.all()
briefs = Brief.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)
+ # events = events.filter(title__icontains=self.q)
briefs = briefs.filter(title__icontains=self.q)
- qs = autocomplete.QuerySetSequence(articles, custompage, events, briefs)
+ qs = autocomplete.QuerySetSequence(articles, custompage, briefs) #, events
if self.q:
# This would apply the filter on all the querysets