def item_add(self): try: for n in range(99): name = "Rezept %d" % (n+1) Recipe.getByName(name) except KeyError: pass self.master.screen_push(AlphaScreen(self.master, label="Name für neues Rezept:", defval=name, callback=self._item_add_finish))
def handle_button_select(self, item): recipe = Recipe.getByName(item) self.master.screen_push(PourScreen(self.master, recipe))