Sign¶
Qualified name: intranet.apps.signage.models.Sign
- class intranet.apps.signage.models.Sign(*args, **kwargs)[source]¶
Bases:
Modelname: friendly display name [required] display: unique name (should match hostname of pi/compute stick) [required]
eighth_block_increment: … landscape: if display is in landscape orientation map_location: location of display on map
lock_page: if set, the signage will only display this page default_page: if set, the signage will revert to this page after a set
amount of time
day_end_switch_page: A page to switch to near the end of the day day_end_switch_minutes: The number of minutes before the end of the day to switch
to day_end_switch_page. Can be negative to switch after the end of the day.
- latest_heartbeat_time: If the sign has an open websocket connection to a
SignageConsumer, this is the time at which the last message was received from it. If the sign does not have such a connection open, this is None (even if the sign previously had an open connection).
pages: a list of pages
- Parameters:
id (AutoField) – Primary key: ID
name (CharField) – Name
display (CharField) – Display
eighth_block_increment (IntegerField) – Eighth block increment
landscape (BooleanField) – Landscape
map_location (CharField) – Map location
img_path (CharField) – Img path
day_end_switch_minutes (IntegerField) – Day end switch minutes. Switch pages this many minutes before the end of the day
custom_switch_time (TimeField) – Custom switch time. Switch to the custom page at this time
custom_switch_page_lock (BooleanField) – Custom switch page lock. Lock the custom page when switching to it
latest_heartbeat_time (DateTimeField) – Latest heartbeat time
Relationship fields:
- Parameters:
lock_page (
ForeignKeytoPage) – Lock page (related name:locked_signs)default_page (
ForeignKeytoPage) – Default page (related name:default_signs)day_end_switch_page (
ForeignKeytoPage) – Day end switch page. Switch to this page near the end of the day (related name:+)custom_switch_page (
ForeignKeytoPage) – Custom switch page. Switch to this page at the custom switch time (related name:custom_page_signs)pages (
ManyToManyFieldtoPage) – Pages (related name:signs)
Methods
Attributes
custom_switch_pageType:
ForeignKeytoPagecustom_switch_page_idInternal field, use
custom_switch_pageinstead.custom_switch_page_lockType:
BooleanFieldcustom_switch_timeType:
TimeFieldday_end_switch_minutesType:
IntegerFieldday_end_switch_pageType:
ForeignKeytoPageday_end_switch_page_idInternal field, use
day_end_switch_pageinstead.default_pageType:
ForeignKeytoPagedefault_page_idInternal field, use
default_pageinstead.displayType:
CharFieldeighth_block_incrementType:
IntegerFieldidType:
AutoFieldimg_pathType:
CharFieldis_offlinelandscapeType:
BooleanFieldlatest_heartbeat_timeType:
DateTimeFieldlock_pageType:
ForeignKeytoPagelock_page_idInternal field, use
lock_pageinstead.map_locationType:
CharFieldnameType:
CharFieldobjectspagesType:
ManyToManyFieldtoPage