本文整理汇总了Python中indico.modules.events.Event.happens_between方法的典型用法代码示例。如果您正苦于以下问题:Python Event.happens_between方法的具体用法?Python Event.happens_between怎么用?Python Event.happens_between使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类indico.modules.events.Event
的用法示例。
在下文中一共展示了Event.happens_between方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: category_events
# 需要导入模块: from indico.modules.events import Event [as 别名]
# 或者: from indico.modules.events.Event import happens_between [as 别名]
def category_events(self, catIds):
from indico.modules.events import Event
query = (Event.query
.filter(~Event.is_deleted,
Event.category_chain.overlap(map(int, catIds)),
Event.happens_between(self._fromDT, self._toDT)))
return self._process(x.as_legacy for x in query)
示例2: category
# 需要导入模块: from indico.modules.events import Event [as 别名]
# 或者: from indico.modules.events.Event import happens_between [as 别名]
def category(self, idlist):
query = (Event.query
.filter(~Event.is_deleted,
Event.category_chain.overlap(map(int, idlist)),
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))
示例3: category_events
# 需要导入模块: from indico.modules.events import Event [as 别名]
# 或者: from indico.modules.events.Event import happens_between [as 别名]
def category_events(self, catIds):
from indico.modules.events import Event
query = (Event.query
.filter(~Event.is_deleted,
Event.category_chain_overlaps(map(int, catIds)),
Event.happens_between(self._fromDT, self._toDT))
.options(joinedload('category').load_only('id', 'title')))
return self._process(x.as_legacy for x in query)
示例4: _query_categ_events
# 需要导入模块: from indico.modules.events import Event [as 别名]
# 或者: from indico.modules.events.Event import happens_between [as 别名]
def _query_categ_events(categ, start_dt, end_dt):
return (Event.query
.with_parent(categ)
.filter(Event.happens_between(start_dt, end_dt))
.options(load_only('id', 'start_dt', 'end_dt')))