Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Use two separate values: a unique event or ticket identifier in your database, and a QR code that carries that identifier (or a check-in URL). When staff scan the code, your server must validate the value, confirm the ticket belongs to that event, check its status, and record the entry. A QR image alone does not verify registration or prevent reuse.
This guide shows a Django implementation that generates IDs and QR codes at registration time without permanently storing image files, then compares managed ticketing options and operational safeguards.
What an event QR code should contain
Choose the smallest payload that lets your system resolve the ticket. Common choices are:
- Ticket ID: identifies one attendee or ticket.
- Order ID: identifies a purchase that may contain several tickets; it is usually not sufficient for admitting one person.
- Opaque ticket secret: a random value that cannot be guessed from a sequential number.
- Check-in URL: for example,
https://events.example.com/check-in/<secret>/.
Wix distinguishes ticket and order concepts, assigns unique ticket numbers when tickets are created through an order, and documents QR check-in URLs containing a ticket number and event ID (Wix ticket API). pretix uses a randomly generated ticket secret that can be represented as a QR code; its documented default is 32 lowercase letters and numbers (pretix ticket secrets). That format is specific to pretix, not a universal standard.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Do not put names, email addresses, or other personal data directly in a QR payload when a random reference can retrieve the record securely.
Design the registration and check-in flow
- Create the event and its ticket type.
- Create a ticket record and generate a unique secret at the same transaction.
- Build a QR code from the secret or a check-in URL.
- Deliver it in an email, PDF ticket, wallet pass, or attendee portal.
- At the door, scan and send the value to a server-side validation endpoint.
- Atomically mark the ticket checked in and return a clear result to staff.
Microsoft’s event-registration documentation makes the boundary explicit: “When you use a QR code to link to a specific event, the QR code only provides a registration ID.” Verification and check-in require custom work in that workflow (Microsoft Learn).
Django implementation without storing QR images
Install the dependencies
python -m pip install django qrcode[pil]
The QR is rendered in memory and returned as a data URI or attachment when needed. You can also render it on demand in an email or HTML ticket.
Model an event ticket
# events/models.py
import secrets
from django.db import models
class Event(models.Model):
name = models.CharField(max_length=200)
starts_at = models.DateTimeField()
class Ticket(models.Model):
event = models.ForeignKey(Event, on_delete=models.CASCADE)
attendee_email = models.EmailField()
ticket_number = models.CharField(max_length=40, unique=True, editable=False)
secret = models.CharField(max_length=64, unique=True, editable=False)
checked_in_at = models.DateTimeField(null=True, blank=True)
canceled_at = models.DateTimeField(null=True, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
def save(self, *args, **kwargs):
if not self.ticket_number:
self.ticket_number = f"EV-{secrets.token_urlsafe(9).upper()}"
if not self.secret:
self.secret = secrets.token_urlsafe(32)
super().save(*args, **kwargs)
The database uniqueness constraints are the final authority. Random secrets should be used for lookups; a visible ticket number is useful for customer support but should not be the only security control.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Create a ticket transactionally
# events/services.py
from django.db import transaction
from .models import Ticket
@transaction.atomic
def issue_ticket(event, attendee_email):
return Ticket.objects.create(
event=event,
attendee_email=attendee_email,
)
After the record commits, send the confirmation. If email delivery fails, you can safely retry because the ticket already has a stable secret.
Generate a QR data URI on demand
# events/qr.py
import base64
from io import BytesIO
import qrcode
from django.urls import reverse
def ticket_qr_data_uri(request, ticket):
path = reverse("ticket-check-in", kwargs={"secret": ticket.secret})
url = request.build_absolute_uri(path)
image = qrcode.make(url)
buffer = BytesIO()
image.save(buffer, format="PNG")
encoded = base64.b64encode(buffer.getvalue()).decode("ascii")
return f"data:image/png;base64,{encoded}"
This avoids a QR-image table and filesystem cleanup. Cache the rendered ticket or use object storage only if your email or PDF pipeline requires a persistent binary.
Validate scans and prevent duplicate entry
Use a POST endpoint rather than exposing a state-changing GET link. Authenticate scanners or staff, and scope every lookup to the event being admitted.
# events/views.py
from django.contrib.auth.decorators import login_required
from django.db import transaction
from django.http import JsonResponse
from django.utils import timezone
from django.views.decorators.http import require_POST
from .models import Ticket
@login_required
@require_POST
def check_in(request, secret):
with transaction.atomic():
ticket = (Ticket.objects.select_for_update()
.select_related("event")
.filter(secret=secret)
.first())
if ticket is None:
return JsonResponse({"ok": False, "reason": "unknown_ticket"}, status=404)
if ticket.canceled_at:
return JsonResponse({"ok": False, "reason": "canceled"}, status=409)
if ticket.checked_in_at:
return JsonResponse({
"ok": False,
"reason": "already_checked_in",
"checked_in_at": ticket.checked_in_at,
}, status=409)
ticket.checked_in_at = timezone.now()
ticket.save(update_fields=["checked_in_at"])
return JsonResponse({"ok": True, "ticket_number": ticket.ticket_number})
select_for_update() serializes simultaneous scans so two devices cannot both accept the same ticket. Add an event filter, staff role check, audit log, and rate limiting in production. For offline venues, use a scanner application that queues signed scan results and resolves conflicts when connectivity returns; do not silently accept an unverified code as valid.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Delivering the code to attendees
- Email: embed the data URI or attach a generated PNG/PDF.
- PDF: render a sufficiently large code with a human-readable ticket number beneath it.
- Wallet or app: regenerate from the stored secret when the pass is displayed.
- Web page: require HTTPS and avoid putting personal information in the URL.
Include fallback text such as the ticket number and support contact. Test printing, low brightness screens, glare, and damaged codes at the actual entrance distance.
Managed platforms versus a custom build
| Approach | Documented behavior | Best fit and trade-offs |
|---|---|---|
| Managed ticketing | Wix assigns ticket numbers and documents QR check-in URLs; Zoom exposes ticket identifiers and QR-code URLs for applicable hybrid or in-person events (Zoom Events APIs). | Fastest lifecycle and delivery. Confirm API scope, event type, revocation, and whether custom validation is supported. |
| Ticket-secret workflow | pretix generates random secrets, represents them as QR codes, and validates them with pretixSCAN. | Good when the scanning app and ticket lifecycle match your operation; integration still depends on the platform’s APIs and policies. |
| Custom registration/check-in | Microsoft’s event QR can provide a registration ID, but verification and check-in must be custom-built. | Maximum control over data and integrations, with responsibility for security, duplicate handling, support, and maintenance. |
Choose based on whether you need a ready-made ticket lifecycle, a platform scanner, or complete control over registration and admission rules.
Operations, security, and reliability checklist
- Generate secrets with a cryptographic random generator and enforce a database uniqueness constraint.
- Keep ticket issuance idempotent so a payment retry does not create accidental duplicates.
- Check event ownership, cancellation, ticket type, and admission window on every scan.
- Record who scanned, when, and at which entrance; restrict that data to authorized staff.
- Return distinct outcomes for valid, unknown, canceled, and already-used tickets.
- Revoke a lost ticket and issue a replacement rather than editing a QR image manually.
- Load-test the endpoint and database lock behavior before doors open.
- Run rehearsals with valid, forged, canceled, and repeat scans, plus a disconnected device.
Common failures and fixes
The scanner sees an unreadable code
Increase rendered size and contrast, leave a quiet margin around the symbol, and avoid compressing a PNG into a blurry screenshot. Regenerate the image from the stored secret instead of copying a resized printout.
A valid ticket is rejected as unknown
Log the normalized payload, verify that URL encoding has not altered characters, and ensure the scanner is pointed at the correct environment and event. Never log the full secret in public logs.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Two entrances accept one ticket
Use a database transaction with row locking, as shown above, and make the check-in write conditional on checked_in_at IS NULL. Display the original check-in time on a repeat scan.
Tickets are duplicated after a payment retry
Store the payment provider’s idempotency key or order ID and make ticket creation idempotent. An order may legitimately contain several ticket records, so do not use the order ID as the individual ticket identity.
Internet service fails at the venue
Plan a documented offline mode, such as a pre-synchronized scanner list with signed records and a reconciliation process. If you cannot verify signatures and revocations offline, switch to a staffed manual fallback rather than accepting every code.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If you need screenshots of your registration page, ticket confirmation, or QR rendering for QA and documentation, ScreenshotNeo provides a single-call capture API. Cookie banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, failed loads, and timeouts are not billed, and each response identifies the page verdict and billing status. Its MCP server lets Claude, Cursor, and other MCP clients call take_screenshot, get_page_info, and capture_pdf.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsFor a direct capture, see the ScreenshotNeo API documentation:
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/ticket/EV-123 -o ticket.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com/ticket/EV-123"}, timeout=90)
open("ticket.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com/ticket/EV-123' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo includes full-page and element capture, custom CSS and JavaScript, device and retina settings, PDF output, waiting rules, request blocking, headers and cookies, caching, signed links, asynchronous webhooks, bulk capture, and usage reporting. Every feature is on every plan: 1,000 screenshots per month are free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Frequently Asked Questions
Should the QR code contain the ticket number or a URL?
Use a URL or opaque secret when you want the server to control validation and status. A plain ticket number is simpler but should not be the sole security mechanism.
Can I generate QR images only when an attendee opens a ticket?
Yes. Store the identifier or secret, render the QR in memory on request, and apply normal authorization and cache controls to the ticket page.
Do I need a dedicated handheld scanner?
No. Microsoft documents handheld scanners and mobile apps as options. Select equipment based on venue throughput, lighting, connectivity, and your check-in software.
The Bottom Line
Generate a unique ticket-level secret, encode it in a QR code, and make every scan pass through an atomic server-side validation and check-in operation. Managed platforms reduce implementation work; a custom Django flow gives you control but makes security, duplicate handling, and offline procedures your responsibility.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

