intranet.apps.signage package¶
Subpackages¶
Submodules¶
intranet.apps.signage.admin module¶
intranet.apps.signage.consumers module¶
intranet.apps.signage.models module¶
-
class
intranet.apps.signage.models.
Page
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
iframe: True if page is just an iframe url: url for iframe (if iframe is True) sandbox: whether the iframe should be sandboxed
template: the path to the template (for server side rendering) button: the name of the fontawesome icon (ex: “fa-chrome”) order: index at which button should be placed
strip_links: whether we strip the links in the iframe (to prevent navigation away)
signs: set of signs which display this Page
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deploy_to
(displays=None, exclude=None)[source]¶ Deploys page to listed display (specify with display). If display is None, deploy to all display. Can specify exclude for which display to exclude. This overwrites the first argument.
-
function
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
iframe
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.ManagerFromPageQuerySet object>¶
-
order
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
sandbox
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
signs
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
strip_links
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
template
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
url
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
intranet.apps.signage.models.
PageQuerySet
(model=None, query=None, using=None, hints=None)[source]¶ Bases:
django.db.models.query.QuerySet
-
order_properly
() → models.query.QuerySet[Page][source]¶ Returns a QuerySet containing all the pages in this QuerySet, but sorted in ascending order by their
order
field (falling back onid
when theorder
fields for two pages are the same).- Returns
A QuerySet containing all the pages in this QuerySet sorted by their
order
andid
fields in ascending order.
-
-
class
intranet.apps.signage.models.
Sign
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.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
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
day_end_switch_minutes
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
day_end_switch_page
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
day_end_switch_page_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
default_page
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
default_page_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
display
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eighth_block_increment
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
img_path
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
is_offline
¶
-
landscape
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
latest_heartbeat_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
lock_page
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
lock_page_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
map_location
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.ManagerFromSignQuerySet object>¶
-
pages
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
class
intranet.apps.signage.models.
SignQuerySet
(model=None, query=None, using=None, hints=None)[source]¶
-
class
intranet.apps.signage.models.
Sign_pages
(id, sign, page)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
page
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
page_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
sign
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
sign_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
intranet.apps.signage.pages module¶
intranet.apps.signage.urls module¶
intranet.apps.signage.views module¶
-
intranet.apps.signage.views.
eighth
(request)[source]¶ Displays the eighth period signage page. This cannot be a regular signage page because it needs to reload in order to switch blocks or update information..