Example #1
0
 def event(self, idlist):
     query = (Event.find(
         Event.id.in_(idlist), ~Event.is_deleted,
         Event.happens_between(self._fromDT, self._toDT)).options(
             *self._get_query_options(self._detail_level)))
     query = self._update_query(query)
     return self.serialize_events(
         x for x in query
         if self._filter_event(x) and x.can_access(self.user))
Example #2
0
 def category_extra(self, ids):
     if self._toDT is None:
         has_future_events = False
     else:
         query = Event.find(Event.category_id.in_(ids), ~Event.is_deleted,
                            Event.start_dt > self._toDT)
         has_future_events = query.has_rows()
     return {
         'eventCategories': self._build_category_path_data(ids),
         'moreFutureEvents': has_future_events
     }