本文整理汇总了Python中indico.modules.vc.models.vc_rooms.VCRoomEventAssociation.get_linked_for_event方法的典型用法代码示例。如果您正苦于以下问题:Python VCRoomEventAssociation.get_linked_for_event方法的具体用法?Python VCRoomEventAssociation.get_linked_for_event怎么用?Python VCRoomEventAssociation.get_linked_for_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类indico.modules.vc.models.vc_rooms.VCRoomEventAssociation
的用法示例。
在下文中一共展示了VCRoomEventAssociation.get_linked_for_event方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _inject_vc_room_action_buttons
# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import get_linked_for_event [as 别名]
def _inject_vc_room_action_buttons(event, item, **kwargs):
event_vc_room = VCRoomEventAssociation.get_linked_for_event(event).get(item)
if event_vc_room and event_vc_room.vc_room.plugin:
return render_plugin_template('{}:vc_room_timetable_buttons.html'.format(event_vc_room.vc_room.plugin.name),
event=event, event_vc_room=event_vc_room, **kwargs)
示例2: _inject_vc_room_action_buttons
# 需要导入模块: from indico.modules.vc.models.vc_rooms import VCRoomEventAssociation [as 别名]
# 或者: from indico.modules.vc.models.vc_rooms.VCRoomEventAssociation import get_linked_for_event [as 别名]
def _inject_vc_room_action_buttons(event, item, **kwargs):
event_vc_room = VCRoomEventAssociation.get_linked_for_event(event).get(item)
if event_vc_room and event_vc_room.vc_room.plugin:
plugin = event_vc_room.vc_room.plugin
name = get_overridable_template_name('vc_room_timetable_buttons.html', plugin, core_prefix='vc/')
return render_template(name, event=event, event_vc_room=event_vc_room, **kwargs)