Esempio n. 1
0
    def __init__(self, *args, **kwargs):
        super(TouchScreenForm, self).__init__(*args, **kwargs)
        for m in Media.get_all_images():
            self.background.choices += [(m.id, f'{m.id}. {m.name}')]

        for m in Media.get_all_audios():
            self.naudio.choices += [(m.id, f'{m.id}. {m.name}')]
Esempio n. 2
0
    def __init__(self, *args, **kwargs):
        super(DisplayScreenForm, self).__init__(*args, **kwargs)
        for m in Media.get_all_images():
            self.background.choices += [(m.id, f'{m.id}. {m.name}')]

        for m in Media.get_all_audios():
            self.naudio.choices += [(m.id, f'{m.id}. {m.name}')]

        for shortcode, bundle in get_tts_safely().items():
            self[f'check{shortcode}'].label = self.translate(
                bundle.get('language'))