Views for each Signage page are located in the pages.py code. To add a new page, define the context in
pages.py. The template should be defined in
Each Signage display renders multiple pages. Each page is defined within a
Pagemodel. Within Django admin, define the:
- name: Some descriptive name to represent the Page (required)
- template: The location of the template (
- function: The function defined in
pages.pyfor server-side rendering of context (e.g.
- button: The name of the font-awesome icon to be used on the navigation bar (e.g.
The other fields can be left at their defaults.
The example Page shown above is named
- Since we want the page to be rendered server-side (not as an iframe), the
iframebox is not checked.
- Since the page is not an iframe, we leave the
urlfield as is.
- Since the page is not an iframe, we can leave the
sandboxcheckbox as is (for more information about sandboxes read https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox).
templatefield is set to
announcements, meaning that Ion will try to render
functionfield is set to
announcements, meaning that Ion will use the
buttonfield is set to
fa-newspaper-o, meaning that this Font Awesome icon will be used in the navigation bar.
orderfield is set to 1, meaning that the button is second on the navigation bar. The pages should be ordered as you want them to appear on the bar (required).
strip_linksfield is checked off because you should not be able to navigate off a page by clicking a link. If this functionality is not desired, uncheck the box.
Each Sign is defined within a
Signmodel. Within Django admin, define the:
name: Some friendly display name (required)
- This is displayed on the main schedule page (e.g. Curie Commons)
display: A unique name (the Stick's host name) (required) (e.g. cs-curie)
landscape: True if display is landscape (bar on right-hand side) and False if display is not landscape (bar on the bottom of the screen)
map_location: This field is not used
img_path: A URL to an image to display on the main schedule page. Leave at the default for the default TJ image (required)
Pagethat should be the only page displayed (if not set all pages will be displayed)
ManyToManyFieldcontaining all pages to be rendered on the Sign (required)
Pagethat will be reverted to after a period of time
The example Sign shown above is named
Curie Commons(and should be deployed there):
- Since it is deployed in Curie Commons, we should set
nameto that. This is also what appears on the Signage display as the display name.
displayfield is set to cs-curie because that is the host name of Sign.
eighth_block_incrementfield can be left as is because this field was only used in Signage1.
img_pathfield is set to the default image path in order to render the default image of the front school. Appropriate images should be selected for each sign (generally a picture of the scientist for whom the commons is named for).
lock_pagefield is left as is, meaning that all pages are displayed. For specific Signs, a lock_page may need to be specified.
default_pagefield is left as is, meaning that the default first page when loaded is the schedule page. In some cases, a specific page should be displayed on a Sign. For example, the bus depot display (
cs-audlob) needs to display the bus map by default.
- All pages that should be rendered by the Sign should be selected in the
pagesfield. They are ordered as per their specified order.
Signage is often used to display pages for special events that occur at TJ. Generally, these are just iframes to some outside webpage. A specific Page should be made for an event. The
iframebox should be checked off and a link to the page should be set in the
functionfields do not need to be filled out in such case.
Often it is necessary to reboot Signage displays. To perform a reboot manually, run
sudo shutdown -r nowor
sudo rebootwithin the Signage's terminal. To reboot the entire deployment, run
ansible -i hosts -a "shutdown -r now" -u user -K signage.
To SSH to the Signage displays, a CSL VPN is necessary. Ask a VPN admin to set up a certificate for you.
To SSH without the Signage password, you should add your RSA public key to the
public_keysfolder in the Ansible repo. Then, you should add the path to that public key to
Update authorized_keys. After that a Signage admin (or you, if you have access to the
signagepipasscard) should run the playbook.
It is a very good idea to keep all changes for the Signage deployment in sync through Ansible. Run
ansible-playbook -K signage.ymlto propogate changes from the Signage playbook to the deployment.