本文整理汇总了Python中app.helpers.ticketing.TicketingManager.create_edit_access_code方法的典型用法代码示例。如果您正苦于以下问题:Python TicketingManager.create_edit_access_code方法的具体用法?Python TicketingManager.create_edit_access_code怎么用?Python TicketingManager.create_edit_access_code使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app.helpers.ticketing.TicketingManager
的用法示例。
在下文中一共展示了TicketingManager.create_edit_access_code方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: access_codes_edit
# 需要导入模块: from app.helpers.ticketing import TicketingManager [as 别名]
# 或者: from app.helpers.ticketing.TicketingManager import create_edit_access_code [as 别名]
def access_codes_edit(event_id, access_code_id=None):
if not TicketingManager.get_access_code(event_id, access_code_id):
abort(404)
if request.method == 'POST':
TicketingManager.create_edit_access_code(request.form, event_id, access_code_id)
flash("The access code has been edited.", "success")
return redirect(url_for('.access_codes_view', event_id=event_id))
return access_codes_create(event_id, access_code_id)
示例2: access_codes_create
# 需要导入模块: from app.helpers.ticketing import TicketingManager [as 别名]
# 或者: from app.helpers.ticketing.TicketingManager import create_edit_access_code [as 别名]
def access_codes_create(event_id, access_code_id=None):
event = DataGetter.get_event(event_id)
if request.method == 'POST':
TicketingManager.create_edit_access_code(request.form, event_id)
flash("The access code has been added.", "success")
return redirect(url_for('.access_codes_view', event_id=event_id))
access_code = None
if access_code_id:
access_code = TicketingManager.get_access_code(event_id, access_code_id)
return render_template('gentelella/users/events/tickets/access_codes_create.html', event=event, event_id=event_id,
access_code=access_code)