本文整理汇总了Python中indico.modules.events.registration.views.WPManageRegistration类的典型用法代码示例。如果您正苦于以下问题:Python WPManageRegistration类的具体用法?Python WPManageRegistration怎么用?Python WPManageRegistration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WPManageRegistration类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _process
def _process(self):
registration_details_html = _render_registration_details(self.registration)
return WPManageRegistration.render_template(
"management/registration_details.html",
self.event,
registration=self.registration,
registration_details_html=registration_details_html,
)
示例2: _process
def _process(self):
return WPManageRegistration.render_template(
"management/regform_modify.html",
self.event,
event=self.event_new,
sections=get_event_section_data(self.regform, management=True),
regform=self.regform,
)
示例3: _process_GET
def _process_GET(self):
reg_list_config = _get_reg_list_config(self.regform)
visible_columns = reg_list_config['items']
return WPManageRegistration.render_template('management/reglist_filter.html', self.event, regform=self.regform,
event=self.event, RegistrationFormItemType=RegistrationFormItemType,
visible_cols_regform_items=visible_columns,
filters=reg_list_config['filters'],
special_items=SPECIAL_COLUMN_LABELS)
示例4: _process
def _process(self):
form = RegistrationFormForm(obj=self._get_form_defaults(), event=self.event)
if form.validate_on_submit():
form.populate_obj(self.regform)
db.session.flush()
flash(_('Registration form has been successfully modified'), 'success')
return redirect(url_for('.manage_regform', self.regform))
return WPManageRegistration.render_template('management/regform_edit.html', self.event, form=form,
event=self.event, regform=self.regform)
示例5: _process
def _process(self):
if self.list_generator.static_link_used:
return redirect(self.list_generator.get_list_url())
reg_list_kwargs = self.list_generator.get_list_kwargs()
badge_templates = [tpl for tpl in set(self.event.designer_templates) | get_inherited_templates(self.event)
if tpl.type == TemplateType.badge]
has_tickets = any(tpl.is_ticket for tpl in badge_templates)
has_badges = any(not tpl.is_ticket for tpl in badge_templates)
return WPManageRegistration.render_template('management/regform_reglist.html', self.event,
has_badges=has_badges, has_tickets=has_tickets, **reg_list_kwargs)
示例6: _process
def _process(self):
form = TicketsForm(obj=self.regform)
if form.validate_on_submit():
form.populate_obj(self.regform)
db.session.flush()
return redirect(url_for('.tickets', self.regform))
return WPManageRegistration.render_template('management/regform_tickets.html', self.event,
regform=self.regform, form=form,
can_enable_tickets=self._check_ticket_app_enabled())
示例7: _process
def _process(self):
regforms = (self.event_new.registration_forms
.filter_by(is_deleted=False)
.order_by(db.func.lower(RegistrationForm.title))
.all())
form = ParticipantsDisplayForm()
if form.validate_on_submit():
data = form.json.data
registration_settings.set(self.event, 'merge_registration_forms', data['merge_forms'])
registration_settings.set_participant_list_form_ids(self.event, data['participant_list_forms'])
registration_settings.set_participant_list_columns(self.event, data['participant_list_columns'])
for regform in regforms:
regform.publish_registrations_enabled = regform.id in data['participant_list_forms']
flash(_("The participants display settings have been saved."), 'success')
return redirect(url_for('.manage_regforms_display', self.event_new))
available_columns = {field[0].name: field[1]['title'] for field in PersonalDataType.FIELD_DATA}
enabled_columns = []
disabled_columns = []
for column_name in registration_settings.get_participant_list_columns(self.event):
if column_name in available_columns:
enabled_columns.append({'id': column_name, 'title': available_columns[column_name]})
del available_columns[column_name]
for column_name, column_title in available_columns.iteritems():
disabled_columns.append({'id': column_name, 'title': column_title})
disabled_columns.sort(key=itemgetter('title'))
available_forms = {regform.id: regform for regform in regforms}
enabled_forms = []
disabled_forms = []
# Handle forms that have already been sorted by the user.
for form_id in registration_settings.get_participant_list_form_ids(self.event):
try:
regform = available_forms[form_id]
except KeyError:
continue
# Make sure publication was not disabled since the display settings were modified.
if regform.publish_registrations_enabled:
enabled_forms.append(regform)
del available_forms[form_id]
for form_id, regform in available_forms.iteritems():
# There might be forms with publication enabled that haven't been sorted by the user yet.
if regform.publish_registrations_enabled:
enabled_forms.append(regform)
else:
disabled_forms.append(regform)
disabled_forms.sort(key=attrgetter('title'))
merge_forms = registration_settings.get(self.event, 'merge_registration_forms')
return WPManageRegistration.render_template('management/regform_display.html', self.event, event=self.event,
regforms=regforms, enabled_columns=enabled_columns,
disabled_columns=disabled_columns, enabled_forms=enabled_forms,
disabled_forms=disabled_forms, merge_forms=merge_forms, form=form)
示例8: _process
def _process(self):
badge_templates = self.event.getBadgeTemplateManager().getTemplates().items()
badge_templates.sort(key=lambda x: x[1].getName())
pdf_options = WConfModifBadgePDFOptions(self.event).getHTML()
badge_design_url = url_for('event_mgmt.confModifTools-badgePrinting', self.event)
create_pdf_url = url_for('event_mgmt.confModifTools-badgePrintingPDF', self.event)
return WPManageRegistration.render_template('management/print_badges.html', self.event, regform=self.regform,
templates=badge_templates, pdf_options=pdf_options,
registrations=self.registrations,
registration_ids=[x.id for x in self.registrations],
badge_design_url=badge_design_url, create_pdf_url=create_pdf_url)
示例9: _process
def _process(self):
return WPManageRegistration.render_template('management/regform_modify.html', self.event, event=self.event_new,
sections=get_event_section_data(self.regform, management=True),
regform=self.regform,
currency=event_settings.get(self.event, 'currency'))
示例10: _process
def _process(self):
regforms = (RegistrationForm.query
.with_parent(self.event)
.options(undefer('active_registration_count'))
.order_by(db.func.lower(RegistrationForm.title)).all())
return WPManageRegistration.render_template('management/regform_list.html', self.event, regforms=regforms)