本文整理汇总了Python中indico.modules.rb.controllers.user.reservations.RHRoomBookingNewBooking类的典型用法代码示例。如果您正苦于以下问题:Python RHRoomBookingNewBooking类的具体用法?Python RHRoomBookingNewBooking怎么用?Python RHRoomBookingNewBooking使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RHRoomBookingNewBooking类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _create_booking
def _create_booking(self, form, room):
booking = RHRoomBookingNewBooking._create_booking(self, form, room)
booking.event_id = self.event_id
if self._assign_to:
_assign_room(self._assign_to, room)
return booking
示例2: _checkParams
def _checkParams(self, params):
RHRoomBookingEventBase._checkParams(self, params)
RHRoomBookingNewBooking._checkParams(self)
assign = request.args.get('assign')
if not assign or assign == 'nothing':
self._assign_to = None
elif assign == 'event':
self._assign_to = self.event
else:
element, _, element_id = assign.partition('-')
if element == 'session':
self._assign_to = self.event.getSessionById(element_id)
elif element == 'contribution':
self._assign_to = self.event.getContributionById(element_id)
else:
raise NoReportError('Invalid assignment')
if not self._assign_to:
raise NoReportError('Invalid assignment')
示例3: _process
def _process(self):
return RHRoomBookingNewBooking._process(self)
示例4: _make_confirm_form
def _make_confirm_form(self, *args, **kwargs):
if 'defaults' in kwargs:
obj = self._assign_to or self.event
kwargs['defaults'].booking_reason = _get_defaults_from_object(obj)['booking_reason']
return RHRoomBookingNewBooking._make_confirm_form(self, *args, **kwargs)
示例5: _get_select_room_form_defaults
def _get_select_room_form_defaults(self):
defaults = RHRoomBookingNewBooking._get_select_room_form_defaults(self)
for key, value in _get_defaults_from_object(self._assign_to or self.event).iteritems():
defaults[key] = value
return defaults
示例6: __init__
def __init__(self):
RHRoomBookingNewBooking.__init__(self)
RHRoomBookingEventBase.__init__(self)