Sign

Qualified name: intranet.apps.signage.models.Sign

class intranet.apps.signage.models.Sign(*args, **kwargs)[source]

Bases: Model

name: 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 (ForeignKey to Page) – Lock page (related name: locked_signs)

  • default_page (ForeignKey to Page) – Default page (related name: default_signs)

  • day_end_switch_page (ForeignKey to Page) – Day end switch page. Switch to this page near the end of the day (related name: +)

  • custom_switch_page (ForeignKey to Page) – Custom switch page. Switch to this page at the custom switch time (related name: custom_page_signs)

  • pages (ManyToManyField to Page) – Pages (related name: signs)

Methods

Attributes

custom_switch_page

Type: ForeignKey to Page

custom_switch_page_id

Internal field, use custom_switch_page instead.

custom_switch_page_lock

Type: BooleanField

custom_switch_time

Type: TimeField

day_end_switch_minutes

Type: IntegerField

day_end_switch_page

Type: ForeignKey to Page

day_end_switch_page_id

Internal field, use day_end_switch_page instead.

default_page

Type: ForeignKey to Page

default_page_id

Internal field, use default_page instead.

display

Type: CharField

eighth_block_increment

Type: IntegerField

id

Type: AutoField

img_path

Type: CharField

is_offline

landscape

Type: BooleanField

latest_heartbeat_time

Type: DateTimeField

lock_page

Type: ForeignKey to Page

lock_page_id

Internal field, use lock_page instead.

map_location

Type: CharField

name

Type: CharField

objects

pages

Type: ManyToManyField to Page