django_program.registration.views_checkin

Staff-facing JSON API views for on-site check-in and product redemption.

These views power the scanner UI used by registration desk volunteers. All endpoints require staff or superuser authentication and are scoped to a conference via the conference_slug URL kwarg. The scanner UI is responsible for including the CSRF token in POST requests.

Classes

LookupView

Look up an attendee by access code without performing check-in.

OfflinePreloadView

Bulk export attendee data for offline scanner fallback.

RedeemView

Redeem a purchased product (order line item) for an attendee.

ScanView

Scan an attendee's access code and perform check-in.

StaffRequiredMixin

Require staff or superuser access for check-in API views.

class django_program.registration.views_checkin.StaffRequiredMixin[source]

Bases: object

Require staff or superuser access for check-in API views.

Resolves the conference from conference_slug and stores it on self.conference. Returns a 403 JSON error if the user lacks permission or a 404 if the conference does not exist.

conference: Conference
dispatch(request, *args, **kwargs)[source]

Validate staff access and resolve conference before dispatching.

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

  • *args (str) – Positional URL arguments.

  • **kwargs (str) – URL keyword arguments including conference_slug.

Return type:

HttpResponse

Returns:

The response from the downstream view, or a 403/401 JSON error.

class django_program.registration.views_checkin.ScanView[source]

Bases: StaffRequiredMixin, View

Scan an attendee’s access code and perform check-in.

Accepts a JSON body with access_code and records the check-in via CheckInService. Returns the attendee data and badge info on success.

post(request, **kwargs)[source]

Process a scan and check in the attendee.

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

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

Return type:

JsonResponse

Returns:

JSON response with attendee data on success, or an error payload.

class django_program.registration.views_checkin.LookupView[source]

Bases: StaffRequiredMixin, View

Look up an attendee by access code without performing check-in.

Read-only endpoint that returns attendee details, purchased products, check-in status, and redeemable line items.

get(request, access_code, **kwargs)[source]

Look up attendee data by access code.

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

  • access_code (str) – The attendee’s access code from the URL.

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

Return type:

JsonResponse

Returns:

JSON response with attendee data, products, and redemption status.

class django_program.registration.views_checkin.RedeemView[source]

Bases: StaffRequiredMixin, View

Redeem a purchased product (order line item) for an attendee.

Accepts a JSON body with access_code and line_item_id and records the redemption via RedemptionService.

post(request, **kwargs)[source]

Process a product redemption.

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

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

Return type:

JsonResponse

Returns:

JSON response with redemption result, or an error payload.

class django_program.registration.views_checkin.OfflinePreloadView[source]

Bases: StaffRequiredMixin, View

Bulk export attendee data for offline scanner fallback.

Returns a JSON array of attendee records for all paid orders in the conference. Optionally filtered by ticket type slug via the ticket_type query parameter.

get(request, **kwargs)[source]

Return preloaded attendee data for offline scanner use.

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

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

Return type:

JsonResponse

Returns:

JSON response with an array of attendee records.