django_program.manage.views_vouchers

Views for voucher bulk operations in the management dashboard.

Classes

VoucherBulkGenerateView

Bulk-generate a batch of voucher codes for the current conference.

class django_program.manage.views_vouchers.VoucherBulkGenerateView[source]

Bases: ManagePermissionMixin, FormView

Bulk-generate a batch of voucher codes for the current conference.

Renders a form for configuring the batch parameters (prefix, count, discount type, etc.) and delegates to the voucher service for creation. On success, redirects to the voucher list with a confirmation message.

template_name = 'django_program/manage/voucher_bulk_generate.html'
form_class

alias of VoucherBulkGenerateForm

get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_form(form_class=None)[source]

Scope the ticket type and add-on querysets to the current conference.

Parameters:

form_class (type[VoucherBulkGenerateForm] | None)

Return type:

VoucherBulkGenerateForm

get_success_url()[source]

Redirect to the voucher list after generation.

Return type:

str