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


Python TicketingManager.get_max_orders_count方法代码示例

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


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

示例1: index_view

# 需要导入模块: from app.helpers.ticketing import TicketingManager [as 别名]
# 或者: from app.helpers.ticketing.TicketingManager import get_max_orders_count [as 别名]
 def index_view(self):
     live_events = DataGetter.get_live_events()
     draft_events = DataGetter.get_draft_events()
     past_events = DataGetter.get_past_events()
     all_events = DataGetter.get_all_events()
     imported_events = DataGetter.get_imports_by_user()
     free_ticket_count = {}
     paid_ticket_count = {}
     donation_ticket_count = {}
     max_free_ticket = {}
     max_paid_ticket = {}
     max_donation_ticket = {}
     for event in all_events:
         free_ticket_count[event.id] = TicketingManager.get_orders_count_by_type(event.id, type='free')
         max_free_ticket[event.id] = TicketingManager.get_max_orders_count(event.id, type='free')
         paid_ticket_count[event.id] = TicketingManager.get_orders_count_by_type(event.id, type='paid')
         max_paid_ticket[event.id] = TicketingManager.get_max_orders_count(event.id, type='paid')
         donation_ticket_count[event.id] = TicketingManager.get_orders_count_by_type(event.id, type='donation')
         max_donation_ticket[event.id] = TicketingManager.get_max_orders_count(event.id, type='donation')
     if not is_verified_user():
         flash(Markup('Your account is unverified. '
                      'Please verify by clicking on the confirmation link that has been emailed to you.<br>'
                      'Did not get the email? Please <a href="/resend_email/" class="alert-link"> click here to resend the confirmation.</a>'))
     return self.render('/gentelella/admin/event/index.html',
                        live_events=live_events,
                        draft_events=draft_events,
                        past_events=past_events,
                        all_events=all_events,
                        free_ticket_count=free_ticket_count,
                        paid_ticket_count=paid_ticket_count,
                        donation_ticket_count=donation_ticket_count,
                        max_free_ticket=max_free_ticket,
                        max_paid_ticket=max_paid_ticket,
                        max_donation_ticket=max_donation_ticket,
                        imported_events=imported_events)
开发者ID:ashishpahwa7,项目名称:open-event-orga-server,代码行数:37,代码来源:events.py

示例2: index_view

# 需要导入模块: from app.helpers.ticketing import TicketingManager [as 别名]
# 或者: from app.helpers.ticketing.TicketingManager import get_max_orders_count [as 别名]
def index_view():
    live_events = DataGetter.get_all_live_events()
    draft_events = DataGetter.get_all_draft_events()
    past_events = DataGetter.get_all_past_events()
    all_events = DataGetter.get_all_events()
    trash_events = DataGetter.get_trash_events()
    free_ticket_count = {}
    paid_ticket_count = {}
    donation_ticket_count = {}
    max_free_ticket = {}
    max_paid_ticket = {}
    max_donation_ticket = {}
    for event in all_events:
        free_ticket_count[event.id] = TicketingManager.get_orders_count_by_type(event.id, type='free')
        max_free_ticket[event.id] = TicketingManager.get_max_orders_count(event.id, type='free')
        paid_ticket_count[event.id] = TicketingManager.get_orders_count_by_type(event.id, type='paid')
        max_paid_ticket[event.id] = TicketingManager.get_max_orders_count(event.id, type='paid')
        donation_ticket_count[event.id] = TicketingManager.get_orders_count_by_type(event.id, type='donation')
        max_donation_ticket[event.id] = TicketingManager.get_max_orders_count(event.id, type='donation')
    return render_template('gentelella/admin/super_admin/events/events.html',
                           live_events=live_events,
                           draft_events=draft_events,
                           past_events=past_events,
                           all_events=all_events,
                           trash_events=trash_events,
                           free_ticket_count=free_ticket_count,
                           paid_ticket_count=paid_ticket_count,
                           donation_ticket_count=donation_ticket_count,
                           max_free_ticket=max_free_ticket,
                           max_paid_ticket=max_paid_ticket,
                           max_donation_ticket=max_donation_ticket,
                           navigation_bar=list_navbar())
开发者ID:aviaryan,项目名称:open-event-orga-server,代码行数:34,代码来源:events.py


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