def choose_a_movie(cls): from view.menu import Menu menu = """ 1)Choose a movie 2)Cancel reservation """ while (True): MovieController.show_all_movies() kwargs = Menu.get_input(menu, option=None) option = kwargs['option'] if option == '1': movie_id = cls.obtain_movie_id() if movie_id: return movie_id else: print("Invalid movie id!") elif option == '2': raise Exception("Canceling reservation...") else: print("Invalid option")
def show_all_movies(cls): return MovieController.show_all_movies()