當前位置: 首頁>>代碼示例>>Python>>正文


Python reservations.RHRoomBookingNewBooking類代碼示例

本文整理匯總了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
開發者ID:pferreir,項目名稱:indico-backup,代碼行數:7,代碼來源:event.py

示例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')
開發者ID:pferreir,項目名稱:indico-backup,代碼行數:18,代碼來源:event.py

示例3: _process

 def _process(self):
     return RHRoomBookingNewBooking._process(self)
開發者ID:pferreir,項目名稱:indico-backup,代碼行數:2,代碼來源:event.py

示例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)
開發者ID:pferreir,項目名稱:indico-backup,代碼行數:5,代碼來源:event.py

示例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
開發者ID:pferreir,項目名稱:indico-backup,代碼行數:5,代碼來源:event.py

示例6: __init__

 def __init__(self):
     RHRoomBookingNewBooking.__init__(self)
     RHRoomBookingEventBase.__init__(self)
開發者ID:pferreir,項目名稱:indico-backup,代碼行數:3,代碼來源:event.py


注:本文中的indico.modules.rb.controllers.user.reservations.RHRoomBookingNewBooking類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。