QR Code Generator¶
Module: app/utilities/genQR.py
genQRCode(ssid, password=None) → str¶
Generates a Wi-Fi QR code image (PNG) for the given SSID and saves it to app/static/img/<ssidName>.png.
The QR code encodes the standard Wi-Fi configuration string format:
Parameters¶
| Parameter | Type | Description |
|---|---|---|
ssid |
SSID |
The SSID model instance |
password |
str \| None |
Override password. Defaults to ssid.ssidPW if not provided |
QR Code Settings¶
| Setting | Value |
|---|---|
| Version | 1 (auto-fit) |
| Error correction | ERROR_CORRECT_L |
| Box size | 10 px |
| Border | 4 boxes |
| Fill / background | Black on white |
Returns¶
str— success message with the saved file pathstr— error message on exception