django_program.manage.views

Views for the conference management dashboard.

Provides permission-gated CRUD views for conference organizers and superadmins. All conference-scoped views inherit from ManagePermissionMixin which resolves the conference from the URL and enforces access control.

Classes

ActivityCreateView

Create a new activity.

ActivityDashboardExportView

Export activity signups as CSV.

ActivityDashboardView

Attendee list and signup management for a single activity.

ActivityEditView

Edit an activity.

ActivityManageListView

List activities for the current conference.

ActivityOrganizerMixin

Permission mixin for per-activity organizer views.

ActivityPromoteSignupView

Promote a waitlisted signup to confirmed.

AddOnCreateView

Create a new add-on for the current conference.

AddOnEditView

Edit an add-on belonging to the current conference.

AddOnListView

List add-ons for the current conference.

ConferenceEditView

Edit conference details.

ConferenceListView

List all conferences visible to the current user.

DashboardView

Conference dashboard with summary statistics.

ImportFromPretalxView

Import a new conference by fetching event metadata from Pretalx.

ImportPretalxStreamView

Stream Pretalx import progress via Server-Sent Events.

ManagePermissionMixin

Permission mixin for conference-scoped management views.

ManualPaymentView

POST-only view to record a manual payment against an order.

OrderDetailView

Display full order details with line items and payments.

OrderListView

List orders for the current conference.

PretalxEventSearchView

JSON API endpoint for Pretalx event autocomplete.

ReceiptApproveView

POST-only view to approve a receipt.

ReceiptFlagView

POST-only view to flag a receipt.

ReceiptReviewDetailView

Display a receipt for review with approve/flag controls.

ReceiptReviewQueueView

Pick a random pending receipt for review.

RoomCreateView

Create a new room for the current conference.

RoomEditView

Edit a room belonging to the current conference.

RoomListView

List rooms for the current conference, ordered by position.

RoomSearchView

JSON API endpoint for room autocomplete within a conference.

ScheduleSlotEditView

Edit a schedule slot belonging to the current conference.

ScheduleSlotListView

List schedule slots for the current conference, grouped by date.

SectionCreateView

Create a new section for the current conference.

SectionEditView

Edit a section belonging to the current conference.

SectionListView

List sections for the current conference.

SpeakerDetailView

Read-only detail view for a speaker in the current conference.

SpeakerListView

List speakers for the current conference.

SponsorCreateView

Create a new sponsor.

SponsorEditView

Edit a sponsor.

SponsorLevelCreateView

Create a new sponsor level.

SponsorLevelEditView

Edit a sponsor level.

SponsorLevelListView

List sponsor levels for the current conference.

SponsorManageListView

List sponsors for the current conference.

SyncPretalxStreamView

Stream Pretalx sync progress via Server-Sent Events.

SyncPretalxView

Trigger a Pretalx sync for the current conference.

SyncSponsorsView

Trigger a PSF sponsor sync for the current conference.

TalkDetailView

Read-only detail view for a talk in the current conference.

TalkEditView

Edit a talk belonging to the current conference.

TalkListView

List talks for the current conference.

TicketTypeCreateView

Create a new ticket type for the current conference.

TicketTypeEditView

Edit a ticket type belonging to the current conference.

TicketTypeListView

List ticket types for the current conference.

TravelGrantDisburseView

Mark a travel grant as disbursed.

TravelGrantManageListView

List travel grant applications for the current conference.

TravelGrantReviewView

Review a travel grant application.

TravelGrantSendMessageView

POST-only view for reviewers to send a message on a grant.

VoucherCreateView

Create a new voucher for the current conference.

VoucherEditView

Edit a voucher belonging to the current conference.

VoucherListView

List vouchers for the current conference.

class django_program.manage.views.ManagePermissionMixin[source]

Bases: LoginRequiredMixin

Permission mixin for conference-scoped management views.

Resolves the conference from the conference_slug URL kwarg and checks that the authenticated user is a superuser or holds the program_conference.change_conference permission. Stores the resolved conference on self.conference and injects it into the template context.

Raises:

PermissionDenied – If the user lacks the required permission.

conference: Conference
kwargs: dict[str, str]
get_submission_type_nav()[source]

Build sidebar navigation data for talk submission types.

Return type:

list[dict[str, str | int]]

dispatch(request, *args, **kwargs)[source]

Resolve the conference and enforce permissions before dispatch.

The conference is resolved and permissions checked after the LoginRequiredMixin verifies authentication but before the view logic executes. If the user is not authenticated, LoginRequiredMixin handles the redirect and we skip conference resolution entirely.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • *args (str) – Positional arguments from the URL resolver.

  • **kwargs (str) – Keyword arguments from the URL pattern.

Return type:

HttpResponse

Returns:

The HTTP response from the downstream view.

Raises:

PermissionDenied – If the user is not authorized.

get_context_data(**kwargs)[source]

Add the conference and sidebar metadata to the template context.

Includes submission_type_nav for the sidebar’s dynamic Talks sub-menu.

Parameters:

**kwargs (object) – Additional context data.

Return type:

dict[str, object]

Returns:

The template context dict with the conference included.

class django_program.manage.views.ConferenceListView[source]

Bases: LoginRequiredMixin, ListView

List all conferences visible to the current user.

Superusers see every conference. Staff users see all active conferences. Other authenticated users are denied access.

template_name = 'django_program/manage/conference_list.html'
context_object_name = 'conferences'
paginate_by = 25
dispatch(request, *args, **kwargs)[source]

Check that the user is a superuser or staff member.

Authentication is checked first; if the user is not logged in, LoginRequiredMixin handles the redirect.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • *args (str) – Positional arguments from the URL resolver.

  • **kwargs (str) – Keyword arguments from the URL pattern.

Return type:

HttpResponse

Returns:

The HTTP response.

Raises:

PermissionDenied – If the user is not superuser or staff.

get_queryset()[source]

Return conferences visible to the current user.

Superusers see all conferences; staff see active conferences only.

Return type:

QuerySet

Returns:

A queryset of Conference instances.

class django_program.manage.views.ImportFromPretalxView[source]

Bases: LoginRequiredMixin, TemplateView

Import a new conference by fetching event metadata from Pretalx.

Presents a form to enter a Pretalx event slug. On POST, fetches event metadata from the Pretalx API, creates a Conference object, and runs a full sync of rooms, speakers, talks, and schedule.

template_name = 'django_program/manage/import_pretalx.html'
dispatch(request, *args, **kwargs)[source]

Check that the user is a superuser or staff member.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • *args (str) – Positional arguments from the URL resolver.

  • **kwargs (str) – Keyword arguments from the URL pattern.

Return type:

HttpResponse

Returns:

The HTTP response.

Raises:

PermissionDenied – If the user is not superuser or staff.

get_context_data(**kwargs)[source]

Add the import form to the template context.

Return type:

dict[str, object]

Returns:

Context dict with the form and token status included.

Parameters:

kwargs (object)

post(request, **kwargs)[source]

Handle the import form submission.

Fetches event metadata from Pretalx, creates the Conference, and runs a full sync.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • **kwargs (str) – URL keyword arguments (unused).

Return type:

HttpResponse

Returns:

A redirect to the new conference dashboard on success, or re-renders the form with errors.

class django_program.manage.views.ImportPretalxStreamView[source]

Bases: LoginRequiredMixin, View

Stream Pretalx import progress via Server-Sent Events.

Returns a StreamingHttpResponse with text/event-stream content type. Each import step (fetch metadata, create conference, sync rooms, speakers, talks, schedule) emits an SSE event so the client can render a live progress bar.

dispatch(request, *args, **kwargs)[source]

Enforce staff/superuser permissions.

Parameters:
  • request (HttpRequest)

  • args (str)

  • kwargs (str)

Return type:

HttpResponse

post(request, **kwargs)[source]

Start the streaming import and return an SSE response.

Parameters:
  • request (HttpRequest)

  • kwargs (str)

Return type:

StreamingHttpResponse

class django_program.manage.views.DashboardView[source]

Bases: ManagePermissionMixin, TemplateView

Conference dashboard with summary statistics.

Displays counts of rooms, speakers, talks, schedule slots, and sections for the selected conference.

template_name = 'django_program/manage/dashboard.html'
get_context_data(**kwargs)[source]

Build dashboard context with summary statistics.

Return type:

dict[str, object]

Returns:

Context dict containing conference, stats, last_synced, and active_nav.

Parameters:

kwargs (object)

class django_program.manage.views.ConferenceEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit conference details.

Stripe keys are excluded from the form for security. On success the user is redirected back to the dashboard with a flash message.

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

alias of ConferenceForm

context_object_name = 'conference'
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Return type:

dict[str, object]

Returns:

Context dict with sidebar active state set.

Parameters:

kwargs (object)

get_object(queryset=None)[source]

Return the conference resolved by the mixin.

Return type:

Conference

Returns:

The current conference instance.

Parameters:

queryset (QuerySet | None)

get_success_url()[source]

Redirect to the conference dashboard after a successful save.

Return type:

str

Returns:

URL of the conference dashboard.

form_valid(form)[source]

Save the form and add a success message.

Parameters:

form (ConferenceForm) – The validated conference form.

Return type:

HttpResponse

Returns:

A redirect response to the success URL.

class django_program.manage.views.SectionListView[source]

Bases: ManagePermissionMixin, ListView

List sections for the current conference.

template_name = 'django_program/manage/section_list.html'
context_object_name = 'sections'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return sections belonging to the current conference.

Return type:

QuerySet

Returns:

A queryset of Section instances ordered by position and date.

class django_program.manage.views.SectionEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit a section belonging to the current conference.

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

alias of SectionForm

context_object_name = 'section'
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Scope the queryset to the current conference.

Return type:

QuerySet

Returns:

A queryset of Section instances for this conference.

get_form_kwargs()[source]

Pass the conference to the form.

Return type:

dict[str, Any]

get_success_url()[source]

Redirect to the section list after a successful save.

Return type:

str

Returns:

URL of the section list view.

form_valid(form)[source]

Re-generate slug from name and save.

Parameters:

form (SectionForm)

Return type:

HttpResponse

class django_program.manage.views.SectionCreateView[source]

Bases: ManagePermissionMixin, CreateView

Create a new section for the current conference.

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

alias of SectionForm

get_context_data(**kwargs)[source]

Add active_nav and is_create to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_form_kwargs()[source]

Pass the conference to the form.

Return type:

dict[str, Any]

form_valid(form)[source]

Assign the conference and auto-generate slug before saving.

Parameters:

form (SectionForm)

Return type:

HttpResponse

get_success_url()[source]

Redirect to the section list after creation.

Return type:

str

class django_program.manage.views.RoomListView[source]

Bases: ManagePermissionMixin, ListView

List rooms for the current conference, ordered by position.

template_name = 'django_program/manage/room_list.html'
context_object_name = 'rooms'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return rooms belonging to the current conference.

Return type:

QuerySet

Returns:

A queryset of Room instances ordered by position.

class django_program.manage.views.RoomEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit a room belonging to the current conference.

Fields synced from Pretalx are disabled when the room has a synced_at timestamp.

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

alias of RoomForm

context_object_name = 'room'
get_queryset()[source]

Scope the queryset to the current conference.

Return type:

QuerySet

Returns:

A queryset of Room instances for this conference.

get_context_data(**kwargs)[source]

Add active_nav and is_synced to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_form_kwargs()[source]

Pass the sync status to the form.

Return type:

dict[str, Any]

Returns:

Form keyword arguments including is_synced.

get_success_url()[source]

Redirect to the room list after a successful save.

Return type:

str

Returns:

URL of the room list view.

form_valid(form)[source]

Save the form and add a success message.

Parameters:

form (RoomForm) – The validated room form.

Return type:

HttpResponse

Returns:

A redirect response to the success URL.

class django_program.manage.views.RoomCreateView[source]

Bases: ManagePermissionMixin, CreateView

Create a new room for the current conference.

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

alias of RoomForm

get_context_data(**kwargs)[source]

Add active_nav and is_create to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_form_kwargs()[source]

Pass is_synced=False so all fields are editable.

Return type:

dict[str, Any]

form_valid(form)[source]

Assign the conference before saving.

Parameters:

form (RoomForm)

Return type:

HttpResponse

get_success_url()[source]

Redirect to the room list after creation.

Return type:

str

class django_program.manage.views.SpeakerListView[source]

Bases: ManagePermissionMixin, ListView

List speakers for the current conference.

Supports search via the q GET parameter, filtering by name or email. This is a read-only view since speaker data comes from Pretalx.

template_name = 'django_program/manage/speaker_list.html'
context_object_name = 'speakers'
paginate_by = 50
get_queryset()[source]

Return speakers filtered by the optional search query.

Return type:

QuerySet

Returns:

A queryset of Speaker instances for this conference.

get_context_data(**kwargs)[source]

Add the search query and active nav to the template context.

Return type:

dict[str, object]

Returns:

Context dict with search_query and active_nav included.

Parameters:

kwargs (object)

class django_program.manage.views.SpeakerDetailView[source]

Bases: ManagePermissionMixin, DetailView

Read-only detail view for a speaker in the current conference.

template_name = 'django_program/manage/speaker_detail.html'
context_object_name = 'speaker'
get_queryset()[source]

Scope speaker lookup to the current conference and preload talks.

Return type:

QuerySet

get_context_data(**kwargs)[source]

Add active nav and related talks ordered by schedule/title.

Parameters:

kwargs (object)

Return type:

dict[str, object]

class django_program.manage.views.TalkListView[source]

Bases: ManagePermissionMixin, ListView

List talks for the current conference.

Supports search via q (title search), filtering via state GET parameter, and filtering by submission type via URL slug.

template_name = 'django_program/manage/talk_list.html'
context_object_name = 'talks'
paginate_by = 50
get_queryset()[source]

Return talks filtered by optional search, state, and type parameters.

Return type:

QuerySet

Returns:

A queryset of Talk instances for this conference.

get_context_data(**kwargs)[source]

Add search query, state filter, type filter, and available states to context.

Return type:

dict[str, object]

Returns:

Context dict with filter parameters included.

Parameters:

kwargs (object)

class django_program.manage.views.TalkDetailView[source]

Bases: ManagePermissionMixin, DetailView

Read-only detail view for a talk in the current conference.

template_name = 'django_program/manage/talk_detail.html'
context_object_name = 'talk'
get_queryset()[source]

Scope talk lookup to conference and preload related speaker/room data.

Return type:

QuerySet

get_context_data(**kwargs)[source]

Add active nav, schedule slots, and override info for this talk.

Parameters:

kwargs (object)

Return type:

dict[str, object]

class django_program.manage.views.TalkEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit a talk belonging to the current conference.

Pretalx-synced fields are disabled when the talk has a synced_at timestamp.

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

alias of TalkForm

context_object_name = 'talk'
get_queryset()[source]

Scope the queryset to the current conference.

Return type:

QuerySet

Returns:

A queryset of Talk instances for this conference.

get_context_data(**kwargs)[source]

Add active_nav, is_synced, and synced_fields to context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_form_kwargs()[source]

Pass the sync status to the form.

Return type:

dict[str, Any]

Returns:

Form keyword arguments including is_synced.

get_success_url()[source]

Redirect to the talk list after a successful save.

Return type:

str

Returns:

URL of the talk list view.

form_valid(form)[source]

Save the form and add a success message.

Parameters:

form (TalkForm) – The validated talk form.

Return type:

HttpResponse

Returns:

A redirect response to the success URL.

class django_program.manage.views.ScheduleSlotListView[source]

Bases: ManagePermissionMixin, ListView

List schedule slots for the current conference, grouped by date.

template_name = 'django_program/manage/schedule_list.html'
context_object_name = 'slots'
paginate_by = 200
get_queryset()[source]

Return schedule slots with related talk and room data.

Return type:

QuerySet

Returns:

A queryset of ScheduleSlot instances for this conference.

get_context_data(**kwargs)[source]

Add active_nav and grouped_slots to the template context.

Groups the paginated slot queryset by date for display with date header rows in the template.

Parameters:

kwargs (object)

Return type:

dict[str, object]

class django_program.manage.views.ScheduleSlotEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit a schedule slot belonging to the current conference.

Pretalx-synced fields are disabled when the slot has a synced_at timestamp.

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

alias of ScheduleSlotForm

context_object_name = 'slot'
get_queryset()[source]

Scope the queryset to the current conference.

Return type:

QuerySet

Returns:

A queryset of ScheduleSlot instances for this conference.

get_context_data(**kwargs)[source]

Add active_nav, is_synced, and synced_fields to context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_form_kwargs()[source]

Pass the sync status to the form.

Return type:

dict[str, Any]

Returns:

Form keyword arguments including is_synced.

get_success_url()[source]

Redirect to the schedule list after a successful save.

Return type:

str

Returns:

URL of the schedule list view.

form_valid(form)[source]

Save the form and add a success message.

Parameters:

form (ScheduleSlotForm) – The validated schedule slot form.

Return type:

HttpResponse

Returns:

A redirect response to the success URL.

class django_program.manage.views.SponsorLevelListView[source]

Bases: ManagePermissionMixin, ListView

List sponsor levels for the current conference.

template_name = 'django_program/manage/sponsor_level_list.html'
context_object_name = 'levels'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return sponsor levels for the current conference.

Return type:

QuerySet

class django_program.manage.views.SponsorLevelEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit a sponsor level.

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

alias of SponsorLevelForm

context_object_name = 'level'
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Scope to the current conference.

Return type:

QuerySet

get_success_url()[source]

Redirect to the sponsor level list.

Return type:

str

form_valid(form)[source]

Save and flash success.

Parameters:

form (SponsorLevelForm)

Return type:

HttpResponse

class django_program.manage.views.SponsorLevelCreateView[source]

Bases: ManagePermissionMixin, CreateView

Create a new sponsor level.

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

alias of SponsorLevelForm

get_context_data(**kwargs)[source]

Add active_nav and is_create to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

form_valid(form)[source]

Assign the conference before saving.

Parameters:

form (SponsorLevelForm)

Return type:

HttpResponse

get_success_url()[source]

Redirect to the sponsor level list.

Return type:

str

class django_program.manage.views.SponsorManageListView[source]

Bases: ManagePermissionMixin, ListView

List sponsors for the current conference.

template_name = 'django_program/manage/sponsor_list.html'
context_object_name = 'sponsors'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return sponsors for the current conference.

Return type:

QuerySet

class django_program.manage.views.SponsorEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit a sponsor.

Fields synced from the PSF API are disabled when the sponsor has an external_id.

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

alias of SponsorForm

context_object_name = 'sponsor'
get_context_data(**kwargs)[source]

Add active_nav, sync status, and benefits to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Scope to the current conference.

Return type:

QuerySet

get_form_kwargs()[source]

Pass the sync status to the form.

Return type:

dict[str, Any]

get_form(form_class=None)[source]

Scope the level queryset to the current conference.

Parameters:

form_class (type[SponsorForm] | None)

Return type:

SponsorForm

get_success_url()[source]

Redirect to the sponsor list.

Return type:

str

form_valid(form)[source]

Save and flash success.

Parameters:

form (SponsorForm)

Return type:

HttpResponse

class django_program.manage.views.SponsorCreateView[source]

Bases: ManagePermissionMixin, CreateView

Create a new sponsor.

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

alias of SponsorForm

get_context_data(**kwargs)[source]

Add active_nav and is_create to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_form_kwargs()[source]

Pass is_synced=False so all fields are editable.

Return type:

dict[str, Any]

get_form(form_class=None)[source]

Scope the level queryset to the current conference.

Parameters:

form_class (type[SponsorForm] | None)

Return type:

SponsorForm

form_valid(form)[source]

Assign the conference before saving.

Parameters:

form (SponsorForm)

Return type:

HttpResponse

get_success_url()[source]

Redirect to the sponsor list.

Return type:

str

class django_program.manage.views.ActivityManageListView[source]

Bases: ManagePermissionMixin, ListView

List activities for the current conference.

template_name = 'django_program/manage/activity_list.html'
context_object_name = 'activities'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return activities for the current conference.

Annotates each activity with signup_count (confirmed only) and waitlist_count to avoid N+1 queries.

Return type:

QuerySet

class django_program.manage.views.ActivityEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit an activity.

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

alias of ActivityForm

context_object_name = 'activity'
get_context_data(**kwargs)[source]

Add active_nav and signup counts to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Scope to the current conference.

Return type:

QuerySet

get_form(form_class=None)[source]

Scope the room queryset to the current conference.

Parameters:

form_class (type[ActivityForm] | None)

Return type:

ActivityForm

get_success_url()[source]

Redirect to the activity list.

Return type:

str

form_valid(form)[source]

Re-generate slug from name and save.

Parameters:

form (ActivityForm)

Return type:

HttpResponse

class django_program.manage.views.ActivityCreateView[source]

Bases: ManagePermissionMixin, CreateView

Create a new activity.

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

alias of ActivityForm

get_context_data(**kwargs)[source]

Add active_nav and is_create to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_form(form_class=None)[source]

Scope the room queryset to the current conference.

Parameters:

form_class (type[ActivityForm] | None)

Return type:

ActivityForm

form_valid(form)[source]

Assign the conference and auto-generate slug before saving.

Parameters:

form (ActivityForm)

Return type:

HttpResponse

get_success_url()[source]

Redirect to the activity list.

Return type:

str

class django_program.manage.views.ActivityOrganizerMixin[source]

Bases: LoginRequiredMixin

Permission mixin for per-activity organizer views.

Grants access if the user is a superuser, holds the global change_conference permission, holds the manage_activity permission, or is listed in the activity’s organizers M2M.

conference: Conference
activity: Activity
kwargs: dict[str, str]
dispatch(request, *args, **kwargs)[source]

Resolve conference and activity, then check permissions.

Parameters:
  • request (HttpRequest)

  • args (str)

  • kwargs (str)

Return type:

HttpResponse

get_context_data(**kwargs)[source]

Inject conference, activity, and sidebar metadata into context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

class django_program.manage.views.ActivityDashboardView[source]

Bases: ActivityOrganizerMixin, ListView

Attendee list and signup management for a single activity.

template_name = 'django_program/manage/activity_dashboard.html'
context_object_name = 'signups'
paginate_by = 50
get_queryset()[source]

Return signups for this activity, optionally filtered by status.

Return type:

QuerySet

get_context_data(**kwargs)[source]

Add signup stats, spots remaining, and filter state.

Parameters:

kwargs (object)

Return type:

dict[str, object]

class django_program.manage.views.ActivityDashboardExportView[source]

Bases: ActivityOrganizerMixin, View

Export activity signups as CSV.

get(request, **kwargs)[source]

Return a CSV download of signups for this activity.

Parameters:
  • request (HttpRequest)

  • kwargs (str)

Return type:

HttpResponse

class django_program.manage.views.ActivityPromoteSignupView[source]

Bases: ActivityOrganizerMixin, View

Promote a waitlisted signup to confirmed.

post(request, **kwargs)[source]

Set a waitlisted signup’s status to confirmed.

Parameters:
  • request (HttpRequest)

  • kwargs (str)

Return type:

HttpResponse

class django_program.manage.views.RoomSearchView[source]

Bases: ManagePermissionMixin, View

JSON API endpoint for room autocomplete within a conference.

get(request, **kwargs)[source]

Search rooms by name for the current conference.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • **kwargs (str) – URL keyword arguments (unused).

Return type:

JsonResponse

Returns:

A JsonResponse with a list of matching rooms.

class django_program.manage.views.TravelGrantManageListView[source]

Bases: ManagePermissionMixin, ListView

List travel grant applications for the current conference.

Provides summary statistics (total requested, total approved, counts by status) and a status filter bar for efficient grant review.

template_name = 'django_program/manage/travel_grant_list.html'
context_object_name = 'grants'
paginate_by = 50
get_context_data(**kwargs)[source]

Add summary stats, status filter, and active nav to context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return travel grants for the current conference.

Return type:

QuerySet

class django_program.manage.views.TravelGrantReviewView[source]

Bases: ManagePermissionMixin, UpdateView

Review a travel grant application.

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

alias of TravelGrantForm

context_object_name = 'grant'
dispatch(request, *args, **kwargs)[source]

Disable browser caching to prevent stale review forms.

Parameters:
  • request (HttpRequest)

  • args (str)

  • kwargs (str)

Return type:

HttpResponse

get_context_data(**kwargs)[source]

Add messages, message form, and review history to context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Scope to the current conference.

Return type:

QuerySet

get_success_url()[source]

Redirect to the travel grants list.

Return type:

str

form_valid(form)[source]

Record the reviewer and flash success.

Parameters:

form (TravelGrantForm)

Return type:

HttpResponse

class django_program.manage.views.TravelGrantSendMessageView[source]

Bases: ManagePermissionMixin, View

POST-only view for reviewers to send a message on a grant.

post(request, **kwargs)[source]

Create a message attached to the grant.

Parameters:
  • request (HttpRequest)

  • kwargs (str)

Return type:

HttpResponse

class django_program.manage.views.TravelGrantDisburseView[source]

Bases: ManagePermissionMixin, View

Mark a travel grant as disbursed.

post(request, **kwargs)[source]

Record disbursement details and transition the grant status.

Only grants in the accepted state can be disbursed. On success the grant is moved to disbursed and the disbursement amount, timestamp, and processing user are recorded.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • **kwargs (str) – URL keyword arguments (expects pk).

Return type:

HttpResponse

Returns:

A redirect to the grant review page.

class django_program.manage.views.ReceiptReviewQueueView[source]

Bases: ManagePermissionMixin, View

Pick a random pending receipt for review.

get(request, **kwargs)[source]

Redirect to a random pending receipt, or back to the grant list if none.

Parameters:
  • request (HttpRequest)

  • kwargs (str)

Return type:

HttpResponse

class django_program.manage.views.ReceiptReviewDetailView[source]

Bases: ManagePermissionMixin, DetailView

Display a receipt for review with approve/flag controls.

template_name = 'django_program/manage/receipt_review.html'
context_object_name = 'receipt'
get_queryset()[source]

Return receipts scoped to the current conference.

Return type:

QuerySet

get_context_data(**kwargs)[source]

Add navigation and flag form to context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

class django_program.manage.views.ReceiptApproveView[source]

Bases: ManagePermissionMixin, View

POST-only view to approve a receipt.

post(request, **kwargs)[source]

Mark the receipt as approved by the current user.

Parameters:
  • request (HttpRequest)

  • kwargs (str)

Return type:

HttpResponse

class django_program.manage.views.ReceiptFlagView[source]

Bases: ManagePermissionMixin, View

POST-only view to flag a receipt.

post(request, **kwargs)[source]

Flag the receipt with a reason provided by the reviewer.

Parameters:
  • request (HttpRequest)

  • kwargs (str)

Return type:

HttpResponse

class django_program.manage.views.SyncPretalxView[source]

Bases: ManagePermissionMixin, View

Trigger a Pretalx sync for the current conference.

Accepts POST requests with optional checkboxes to select which entities to sync (rooms, speakers, talks, schedule). When no checkboxes are selected, syncs everything.

post(request, **kwargs)[source]

Run the Pretalx sync and redirect back to the dashboard.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • **kwargs (str) – URL keyword arguments (unused).

Return type:

HttpResponse

Returns:

A redirect to the conference dashboard with a flash message.

class django_program.manage.views.SyncSponsorsView[source]

Bases: ManagePermissionMixin, View

Trigger a PSF sponsor sync for the current conference.

Accepts POST requests. Only available for PyCon US conferences where the sponsor profile supports API sync.

post(request, **kwargs)[source]

Run the PSF sponsor sync and redirect back to the dashboard.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • **kwargs (str) – URL keyword arguments (unused).

Return type:

HttpResponse

Returns:

A redirect to the conference dashboard with a flash message.

class django_program.manage.views.SyncPretalxStreamView[source]

Bases: ManagePermissionMixin, View

Stream Pretalx sync progress via Server-Sent Events.

Returns a StreamingHttpResponse that yields progress events as each sync step (rooms, speakers, talks, schedule) completes.

post(request, **kwargs)[source]

Start the streaming sync and return an SSE response.

Parameters:
  • request (HttpRequest)

  • kwargs (str)

Return type:

StreamingHttpResponse

class django_program.manage.views.PretalxEventSearchView[source]

Bases: LoginRequiredMixin, View

JSON API endpoint for Pretalx event autocomplete.

Returns a filtered list of events from the Pretalx API, matched against the q query parameter by slug and localized name. Results are cached in-memory for 5 minutes per API token.

dispatch(request, *args, **kwargs)[source]

Enforce staff/superuser permissions.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • *args (str) – Positional arguments from the URL resolver.

  • **kwargs (str) – Keyword arguments from the URL pattern.

Return type:

HttpResponse

Returns:

The HTTP response.

Raises:

PermissionDenied – If the user is not superuser or staff.

get(request, **kwargs)[source]

Search Pretalx events by slug or name.

Reads q for the search text and an optional token override. Fetches all events from the Pretalx API (cached for 5 minutes), filters by case-insensitive substring match on slug and localized name, and returns up to 20 results.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • **kwargs (str) – URL keyword arguments (unused).

Return type:

JsonResponse

Returns:

A JsonResponse with a list of matching events, or an error payload with status 502 on upstream failure.

class django_program.manage.views.TicketTypeListView[source]

Bases: ManagePermissionMixin, ListView

List ticket types for the current conference.

template_name = 'django_program/manage/ticket_type_list.html'
context_object_name = 'ticket_types'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav and global capacity info to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return ticket types for the current conference.

Annotates each ticket type with:

  • sold_count – number of order line items from paid or partially refunded orders.

  • revenue – gross revenue (total line amounts before refunds).

  • remaining_quantity – tickets still available for purchase, computed as total_quantity - reserved where reserved counts quantities from paid/partially-refunded orders plus pending orders with an active inventory hold. Unlimited ticket types (total_quantity == 0) get None.

Return type:

QuerySet

Returns:

A queryset of TicketType instances ordered by display order.

class django_program.manage.views.TicketTypeCreateView[source]

Bases: ManagePermissionMixin, CreateView

Create a new ticket type for the current conference.

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

alias of TicketTypeForm

get_context_data(**kwargs)[source]

Add active_nav and is_create to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

form_valid(form)[source]

Assign the conference and auto-generate slug before saving.

Parameters:

form (TicketTypeForm)

Return type:

HttpResponse

get_success_url()[source]

Redirect to the ticket type list.

Return type:

str

class django_program.manage.views.TicketTypeEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit a ticket type belonging to the current conference.

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

alias of TicketTypeForm

context_object_name = 'ticket_type'
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Scope to the current conference.

Return type:

QuerySet

get_success_url()[source]

Redirect to the ticket type list.

Return type:

str

form_valid(form)[source]

Save and flash success.

Parameters:

form (TicketTypeForm)

Return type:

HttpResponse

class django_program.manage.views.AddOnListView[source]

Bases: ManagePermissionMixin, ListView

List add-ons for the current conference.

template_name = 'django_program/manage/addon_list.html'
context_object_name = 'addons'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return add-ons for the current conference.

Annotates each add-on with sold_count and revenue from orders in paid or partially refunded status. The revenue value represents gross revenue (total line amounts before any refunds are subtracted). Partially refunded orders contribute their full original line totals. Prefetches the requires_ticket_types relation for efficient template rendering.

Return type:

QuerySet

Returns:

A queryset of AddOn instances ordered by display order.

class django_program.manage.views.AddOnCreateView[source]

Bases: ManagePermissionMixin, CreateView

Create a new add-on for the current conference.

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

alias of AddOnForm

get_context_data(**kwargs)[source]

Add active_nav and is_create to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

form_valid(form)[source]

Assign the conference and auto-generate slug before saving.

Parameters:

form (AddOnForm)

Return type:

HttpResponse

get_success_url()[source]

Redirect to the add-on list.

Return type:

str

class django_program.manage.views.AddOnEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit an add-on belonging to the current conference.

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

alias of AddOnForm

context_object_name = 'addon'
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Scope to the current conference.

Return type:

QuerySet

get_success_url()[source]

Redirect to the add-on list.

Return type:

str

form_valid(form)[source]

Save and flash success.

Parameters:

form (AddOnForm)

Return type:

HttpResponse

class django_program.manage.views.VoucherListView[source]

Bases: ManagePermissionMixin, ListView

List vouchers for the current conference.

Voucher codes are partially masked in the template for security.

template_name = 'django_program/manage/voucher_list.html'
context_object_name = 'vouchers'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return vouchers for the current conference.

Return type:

QuerySet

Returns:

A queryset of Voucher instances ordered by creation date.

class django_program.manage.views.VoucherCreateView[source]

Bases: ManagePermissionMixin, CreateView

Create a new voucher for the current conference.

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

alias of VoucherForm

get_context_data(**kwargs)[source]

Add active_nav and is_create 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[VoucherForm] | None)

Return type:

VoucherForm

form_valid(form)[source]

Assign the conference before saving.

Parameters:

form (VoucherForm)

Return type:

HttpResponse

get_success_url()[source]

Redirect to the voucher list.

Return type:

str

class django_program.manage.views.VoucherEditView[source]

Bases: ManagePermissionMixin, UpdateView

Edit a voucher belonging to the current conference.

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

alias of VoucherForm

context_object_name = 'voucher'
get_context_data(**kwargs)[source]

Add active_nav to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Scope to the current conference.

Return type:

QuerySet

get_form(form_class=None)[source]

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

Parameters:

form_class (type[VoucherForm] | None)

Return type:

VoucherForm

get_success_url()[source]

Redirect to the voucher list.

Return type:

str

form_valid(form)[source]

Save and flash success.

Parameters:

form (VoucherForm)

Return type:

HttpResponse

class django_program.manage.views.OrderListView[source]

Bases: ManagePermissionMixin, ListView

List orders for the current conference.

Supports filtering by order status via the status GET parameter. Paginated at 50 orders per page.

template_name = 'django_program/manage/order_list.html'
context_object_name = 'orders'
paginate_by = 50
get_context_data(**kwargs)[source]

Add active_nav and status filter to the template context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

get_queryset()[source]

Return orders for the current conference with optional status filter.

Return type:

QuerySet

Returns:

A queryset of Order instances ordered by creation date descending.

class django_program.manage.views.OrderDetailView[source]

Bases: ManagePermissionMixin, DetailView

Display full order details with line items and payments.

Includes a manual payment form for staff to record comp/manual payments.

template_name = 'django_program/manage/order_detail.html'
context_object_name = 'order'
get_queryset()[source]

Scope order lookup to the current conference.

Return type:

QuerySet

get_context_data(**kwargs)[source]

Add line items, payments, and manual payment form to context.

Parameters:

kwargs (object)

Return type:

dict[str, object]

class django_program.manage.views.ManualPaymentView[source]

Bases: ManagePermissionMixin, View

POST-only view to record a manual payment against an order.

When total successful payments meet or exceed the order total, the order status is automatically transitioned to paid.

post(request, **kwargs)[source]

Record a manual payment and optionally mark the order as paid.

Parameters:
  • request (HttpRequest) – The incoming HTTP request.

  • **kwargs (str) – URL keyword arguments (expects pk).

Return type:

HttpResponse

Returns:

A redirect to the order detail page.