Beispiel #1
0
    def post(self):
        self.application.display_sequence = [
            d for d, _ in get_selectable_displays() if self.get_argument('seq_' + d, None)
        ]
        SequencedDisplay.set_delay(int(self.get_argument('display_pause', '5')))

        level, message = (self.get_argument('msg_' + fld) for fld in ('level', 'text'))
        self.application.tv_message = (level, message) if message else None
Beispiel #2
0
 def template_args(self):
     return {
         'selectable_displays': [
             (display_name, label, display_name in self.application.display_sequence)
             for display_name, label in get_selectable_displays()
         ],
         'display_pause': SequencedDisplay.get_delay()
     }