From 3dbb7d1809c3d5b99c3aaba19d9049414614cfe6 Mon Sep 17 00:00:00 2001 From: ada-dmitry Date: Sun, 5 May 2024 14:20:03 +0300 Subject: [PATCH] 0.4 --- main.py | 37 +++--------------- .../__pycache__/__init__.cpython-311.pyc | Bin 11153 -> 11144 bytes texts.py | 20 ++++++++++ 3 files changed, 25 insertions(+), 32 deletions(-) create mode 100644 texts.py diff --git a/main.py b/main.py index 3018d97..5150371 100644 --- a/main.py +++ b/main.py @@ -1,12 +1,11 @@ import add_func import sys +import texts sys.path.append('tables') from project_config import * from dbconnection import * -# from tables.people_table import * -# from tables.phones_table import * from tables.dish_table import * from tables.cath_table import * @@ -31,14 +30,6 @@ class Main: return def db_insert_somethings(self): - # pt = PeopleTable() - # pht = PhonesTable() - # pt.insert_one(["Test", "Test", "Test"]) - # pt.insert_one(["Test2", "Test2", "Test2"]) - # pt.insert_one(["Test3", "Test3", "Test3"]) - # pht.insert_one([1, "123"]) - # pht.insert_one([2, "123"]) - # pht.insert_one([3, "123"]) cth = CathTable() dsh = DishTable() @@ -52,21 +43,14 @@ class Main: dsh.insert_one([3, "40 minutes", "Паста", "Почувствуй себя итальянцем"]) def db_drop(self): - # pht = PhonesTable() - # pt = PeopleTable() cth = CathTable() d = DishTable() - # pht.drop() - # pt.drop() d.drop() cth.drop() return def show_main_menu(self): - menu = """Привутствуем в меню, выберите действие: - 1 - просмотр категорий; - 2 - сброс и инициализация БД; - 9 - выход;""" + menu = texts.show_main_menu_txt print(menu) return @@ -88,20 +72,14 @@ class Main: def show_cath(self): self.cath_id = -1 - menu = """Просмотр списка категорий! -№\tНазвание\n-------------------------------------------------------------------------------------""" + menu = texts.show_cath_1txt print(menu) lst = CathTable().all() j = 1 for i in lst: print(str(j) + "\t" + str(i[0])) j += 1 - menu = """-------------------------------------------------------------------------------------\nДальнейшие операции: - 0 - возврат в главное меню; - 3 - добавление новой категории; - 4 - удаление категории; - 5 - просмотр блюд в категории; - 9 - выход.""" + menu = texts.show_cath_2txt print(menu) return @@ -207,12 +185,7 @@ class Main: for i in lst: print(str(j) + "\t" + i[2] + "\t\t" + str(i[1]) + "\t\t\t" + str(i[4])) j += 1 - menu = """-------------------------------------------------------------------------------------\nДальнейшие операции: - 0 - возврат в главное меню; - 1 - возврат в просмотр категорий; - 6 - добавление нового блюда; - 7 - удаление блюда; - 9 - выход.""" + menu = texts.show_dish_in_cath_txt print(menu) return self.read_next_step() diff --git a/project/Lib/site-packages/_distutils_hack/__pycache__/__init__.cpython-311.pyc b/project/Lib/site-packages/_distutils_hack/__pycache__/__init__.cpython-311.pyc index a703aefa3524d4f5e0a21adbb803ba7c079c71e0..9a339ebd33d98b7082fed3d13cb49ff92074ab5c 100644 GIT binary patch delta 47 zcmbOj-Vx5XoR^o20SLmf%+t