django_program.registration.services.badge

Badge generation service for creating attendee badges with QR codes.

Generates PDF and PNG badges using reportlab and Pillow respectively, with embedded QR codes encoding the attendee’s access code for check-in scanning.

Classes

BadgeGenerationService

Generates badge PDFs and PNGs with QR codes for attendee check-in.

class django_program.registration.services.badge.BadgeGenerationService[source]

Bases: object

Generates badge PDFs and PNGs with QR codes for attendee check-in.

generate_qr_code(data, size=200)[source]

Generate a QR code PNG as bytes.

Parameters:
  • data (str) – The string to encode in the QR code.

  • size (int) – The pixel dimensions of the output image.

Return type:

bytes

Returns:

PNG image bytes.