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


Python VCRoomEventAssociation.find_for_event方法代码示例

本文整理汇总了Python中indico.modules.vc.models.vc_rooms.VCRoomEventAssociation.find_for_event方法的典型用法代码示例。如果您正苦于以下问题:Python VCRoomEventAssociation.find_for_event方法的具体用法?Python VCRoomEventAssociation.find_for_event怎么用?Python VCRoomEventAssociation.find_for_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在indico.modules.vc.models.vc_rooms.VCRoomEventAssociation的用法示例。


在下文中一共展示了VCRoomEventAssociation.find_for_event方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _session_slot_deleted

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
def _session_slot_deleted(session_slot, **kwargs):
    event = session_slot.getConference()
    if event.has_legacy_id:
        return
    for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True):
        if event_vc_room.link_object is None:
            event_vc_room.link_type = VCRoomLinkType.event
            event_vc_room.link_id = None
开发者ID:svdoever,项目名称:indico,代码行数:10,代码来源:__init__.py

示例2: _contrib_deleted

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
def _contrib_deleted(contrib, **kwargs):
    event = contrib.getConference()
    if not event.id.isdigit():
        return
    for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True):
        if event_vc_room.link_object is None:
            event_vc_room.link_type = VCRoomLinkType.event
            event_vc_room.link_id = None
开发者ID:NIIF,项目名称:indico,代码行数:10,代码来源:__init__.py

示例3: _process

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def _process(self):
     try:
         room_event_assocs = VCRoomEventAssociation.find_for_event(self._conf, include_hidden=True,
                                                                   include_deleted=True).all()
     except ValueError:
         raise IndicoError(_('This page is not available for legacy events.'))
     event_vc_rooms = [event_vc_room for event_vc_room in room_event_assocs if event_vc_room.vc_room.plugin]
     return WPVCManageEvent.render_template('manage_event.html', self._conf, event=self._conf,
                                            event_vc_rooms=event_vc_rooms, plugins=get_vc_plugins().values())
开发者ID:marcosmolla,项目名称:indico,代码行数:11,代码来源:controllers.py

示例4: _process

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def _process(self):
     event_vc_rooms = VCRoomEventAssociation.find_for_event(self.event_new).all()
     vc_plugins_available = bool(get_vc_plugins())
     linked_to = defaultdict(lambda: defaultdict(list))
     for event_vc_room in event_vc_rooms:
         if event_vc_room.vc_room.plugin:
             linked_to[event_vc_room.link_type.name][event_vc_room.link_object].append(event_vc_room)
     return WPVCEventPage.render_template('event_vc.html', self._conf, event=self.event_new,
                                          event_vc_rooms=event_vc_rooms, linked_to=linked_to,
                                          vc_plugins_available=vc_plugins_available)
开发者ID:,项目名称:,代码行数:12,代码来源:

示例5: clone

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def clone(self, new_event, options):
     if 'vc_rooms' not in options:
         return
     for old_event_vc_room in VCRoomEventAssociation.find_for_event(self.event, include_hidden=True):
         event_vc_room = VCRoomEventAssociation(event_id=int(new_event.id),
                                                link_type=old_event_vc_room.link_type,
                                                link_id=old_event_vc_room.link_id,
                                                show=old_event_vc_room.show,
                                                data=old_event_vc_room.data)
         if event_vc_room.link_object is not None:
             event_vc_room.vc_room = old_event_vc_room.vc_room
             db.session.add(event_vc_room)
开发者ID:NIIF,项目名称:indico,代码行数:14,代码来源:__init__.py

示例6: _process

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def _process(self):
     room_event_assocs = VCRoomEventAssociation.find_for_event(
         self.event_new, include_hidden=True, include_deleted=True
     ).all()
     event_vc_rooms = [event_vc_room for event_vc_room in room_event_assocs if event_vc_room.vc_room.plugin]
     return WPVCManageEvent.render_template(
         "manage_event.html",
         self._conf,
         event=self.event_new,
         event_vc_rooms=event_vc_rooms,
         plugins=get_vc_plugins().values(),
     )
开发者ID:OmeGak,项目名称:indico,代码行数:14,代码来源:controllers.py

示例7: _event_deleted

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
def _event_deleted(event, **kwargs):
    if not event.id.isdigit():
        return
    for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True):
        event_vc_room.delete(_get_user())
开发者ID:NIIF,项目名称:indico,代码行数:7,代码来源:__init__.py

示例8: _visible

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def _visible(event):
     if not event.id.isdigit():
         return False
     return (bool(get_vc_plugins()) and
             bool(VCRoomEventAssociation.find_for_event(event, only_linked_to_event=True).count()))
开发者ID:NIIF,项目名称:indico,代码行数:7,代码来源:__init__.py

示例9: _inject_event_header

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
def _inject_event_header(event, **kwargs):
    res = VCRoomEventAssociation.find_for_event(event, only_linked_to_event=True)
    event_vc_rooms = [event_vc_room for event_vc_room in res.all() if event_vc_room.vc_room.plugin is not None]
    if event_vc_rooms:
        return render_template('vc/event_header.html', event=event, event_vc_rooms=event_vc_rooms)
开发者ID:NIIF,项目名称:indico,代码行数:7,代码来源:__init__.py

示例10: get_options

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def get_options(self):
     enabled = bool(VCRoomEventAssociation.find_for_event(self.event, include_hidden=True).count())
     return {'vc_rooms': (_('Video conference rooms'), enabled, True)}
开发者ID:NIIF,项目名称:indico,代码行数:5,代码来源:__init__.py

示例11: _event_deleted

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
def _event_deleted(event, **kwargs):
    user = session.user if has_request_context() and session.user else User.get(Config.getInstance().getJanitorUserId())
    for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True):
        event_vc_room.delete(user)
开发者ID:MichelCordeiro,项目名称:indico,代码行数:6,代码来源:__init__.py

示例12: _visible

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def _visible(event):
     return bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event).count())
开发者ID:MichelCordeiro,项目名称:indico,代码行数:4,代码来源:__init__.py

示例13: _visible

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def _visible(event):
     if event.has_legacy_id:
         return False
     return bool(get_vc_plugins()) and bool(VCRoomEventAssociation.find_for_event(event).count())
开发者ID:svdoever,项目名称:indico,代码行数:6,代码来源:__init__.py

示例14: _event_deleted

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
def _event_deleted(event, **kwargs):
    user = session.user if has_request_context() and session.user else User.get_system_user()
    for event_vc_room in VCRoomEventAssociation.find_for_event(event, include_hidden=True, include_deleted=True):
        event_vc_room.delete(user)
开发者ID:indico,项目名称:indico,代码行数:6,代码来源:__init__.py

示例15: _visible

# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import find_for_event [as 别名]
 def _visible(event):
     return bool(get_vc_plugins()) and VCRoomEventAssociation.find_for_event(event).has_rows()
开发者ID:indico,项目名称:indico,代码行数:4,代码来源:__init__.py


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