signage Signage Devices¶
Author: Zhenyu Yang yangzhenyu@sust.edu.cn
Last updated: Apr 24, 2026
Corresponding API docs: Signage Device API
signage Code Entry¶
backend/apps/signage/models/__init__.pybackend/apps/signage/views/__init__.pybackend/apps/signage/serializers/__init__.pybackend/apps/signage/authentication.pybackend/apps/signage/tokens.py
signage Core Data¶
SignageDevice¶
One-to-one with
Classroom.Key fields:
device_codedevice_labelsignage_titlesignage_subtitlesignage_configdevice_token_hashactivation_code_hashtoken_issued_atactivated_atlast_seen_at
The backend only stores hashes of the activation code and device token; plaintext values are never persisted.
Two Interface Surfaces¶
Device Side¶
POST /signage/activateGET /signage/deviceGET /signage/device/schedule
The device side exclusively uses Authorization: Bearer <device_token>; it does not use user JWTs.
Admin Side¶
GET /signage/classrooms/<id>GET /signage/classrooms/<id>/schedulePATCH /signage/classrooms/<id>/configPOST /signage/classrooms/<id>/activation-codePOST /signage/classrooms/<id>/revoke-token
The admin side requires standard user authentication, and the current implementation only allows superadmin.
Activation Flow¶
The admin side issues a one-time
activation_codefor a classroom.The Android signage device scans the QR code to obtain the
classroom_idandactivation_code.The device calls
POST /signage/activate.The backend validates:
The activation code exists and has not expired.
The classroom matches.
If the device already has a bound
device_code, it must match.The
device_codemust not conflict with another classroom’s device.
On success, a long-lived device token is issued and the one-time activation code is cleared.
Schedule Source¶
Signage schedules read only from
CourseOccurrence.Manual reservations are not merged.
The returned structure includes course name, course number, teacher name, class, class period, and time range.
Configuration¶
Configurable fields:
device_labelsignage_titlesignage_subtitleannouncements
announcementsare written tosignage_config["announcements"].
Current Boundaries¶
Signage already has independent device authentication and an activation lifecycle.
Currently, signage is a display-only terminal; it does not write check-in records or call
face-service.