当前位置: 首页>>代码示例>>Python>>正文


Python Event.happens_between方法代码示例

本文整理汇总了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)
开发者ID:belokop,项目名称:indico_bare,代码行数:9,代码来源:api.py

示例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))
开发者ID:belokop,项目名称:indico_bare,代码行数:10,代码来源:api.py

示例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)
开发者ID:fph,项目名称:indico,代码行数:10,代码来源:api.py

示例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')))
开发者ID:indico,项目名称:indico,代码行数:7,代码来源:suggestions.py


注:本文中的indico.modules.events.Event.happens_between方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。