fix(db): fix full name of product
This commit is contained in:
1 parent
cec3357975
commit
00dd1d5d7c
1 file changed
+17
-17
+17
-17
@@ -116,7 +116,7 @@ def init_tables(db_name='pipe_store.db'):
|
||||
]
|
||||
|
||||
for size, diameter, thickness, length, color, app_type, stiffness in internal_pipes:
|
||||
full_name = f"Труба ПВХ для ВНУТРЕННЕЙ канализации (цвет {color}), со сплошной стенкой толщиной {thickness} мм {diameter}x{thickness}x{length}"
|
||||
full_name = f"Труба НПВХ {diameter}x{thickness}x{length} мм внутренняя"
|
||||
# Замена на внешнюю ссылку
|
||||
image_url = f"{base_url}/products/internal_{diameter}_{length}.png"
|
||||
|
||||
@@ -155,7 +155,7 @@ def init_tables(db_name='pipe_store.db'):
|
||||
|
||||
for size, diameter, thickness, length, color, app_type, stiffness in external_pipes:
|
||||
stiffness_text = f", класс жесткости {stiffness}" if stiffness else ""
|
||||
full_name = f"Труба ПВХ для НАРУЖНОЙ канализации (цвет {color}), со сплошной стенкой{stiffness_text} {diameter}x{thickness}x{length}"
|
||||
full_name = f"Труба НПВХ {diameter}x{thickness}x{length} мм наружная"
|
||||
# Замена на внешнюю ссылку
|
||||
suffix = stiffness or 'std'
|
||||
image_url = f"{base_url}/products/external_{diameter}_{suffix}_{length}.png"
|
||||
@@ -178,21 +178,21 @@ def init_tables(db_name='pipe_store.db'):
|
||||
("Отвод 160х30°", elbows_category_id, "отвод", 160, None, None, None, None, "30°"),
|
||||
("Отвод 160х45°", elbows_category_id, "отвод", 160, None, None, None, None, "45°"),
|
||||
("Отвод 160х87°", elbows_category_id, "отвод", 160, None, None, None, None, "87°"),
|
||||
("Тройник 45° 110х110", tee_category_id, "тройник", 110, None, None, None, None, "45°"),
|
||||
("Тройник 45° 160х110", tee_category_id, "тройник", 160, None, None, None, None, "45°"),
|
||||
("Тройник 45° 160х160", tee_category_id, "тройник", 160, None, None, None, None, "45°"),
|
||||
("Тройник 87° 110х110", tee_category_id, "тройник", 110, None, None, None, None, "87°"),
|
||||
("Тройник 87° 160х110", tee_category_id, "тройник", 160, None, None, None, None, "87°"),
|
||||
("Тройник 87° 160х160", tee_category_id, "тройник", 160, None, None, None, None, "87°"),
|
||||
("Муфта надвижная (ремонтная) 110", couplings_category_id, "муфта", 110, None, None, None, None, None),
|
||||
("Муфта надвижная (ремонтная) 160", couplings_category_id, "муфта", 160, None, None, None, None, None),
|
||||
("Муфта соединительная 110", couplings_category_id, "муфта", 110, None, None, None, None, None),
|
||||
("Муфта соединительная 160", couplings_category_id, "муфта", 160, None, None, None, None, None),
|
||||
("Редуктор 160", couplings_category_id, "редуктор", 160, None, None, None, None, None),
|
||||
("Заглушка для раструба 110", accessories_category_id, "заглушка", 110, None, None, None, None, None),
|
||||
("Заглушка для раструба 160", accessories_category_id, "заглушка", 160, None, None, None, None, None),
|
||||
("Ревизия 110", accessories_category_id, "ревизия", 110, None, None, None, None, None),
|
||||
("Ревизия 160", accessories_category_id, "ревизия", 160, None, None, None, None, None),
|
||||
("Тройник 110х110 мм на 45°", tee_category_id, "тройник", 110, None, None, None, None, "45°"),
|
||||
("Тройник 160х110 мм на 45°", tee_category_id, "тройник", 160, None, None, None, None, "45°"),
|
||||
("Тройник 160х160 мм на 45°", tee_category_id, "тройник", 160, None, None, None, None, "45°"),
|
||||
("Тройник 110х110 мм на 87°", tee_category_id, "тройник", 110, None, None, None, None, "87°"),
|
||||
("Тройник 160х110 мм на 87°", tee_category_id, "тройник", 160, None, None, None, None, "87°"),
|
||||
("Тройник 160х160 мм на 87°", tee_category_id, "тройник", 160, None, None, None, None, "87°"),
|
||||
("Муфта надвижная (ремонтная) 110 мм", couplings_category_id, "муфта", 110, None, None, None, None, None),
|
||||
("Муфта надвижная (ремонтная) 160 мм", couplings_category_id, "муфта", 160, None, None, None, None, None),
|
||||
("Муфта соединительная 110 мм", couplings_category_id, "муфта", 110, None, None, None, None, None),
|
||||
("Муфта соединительная 160 мм", couplings_category_id, "муфта", 160, None, None, None, None, None),
|
||||
("Редуктор 160 мм", couplings_category_id, "редуктор", 160, None, None, None, None, None),
|
||||
("Заглушка для раструба 110 мм", accessories_category_id, "заглушка", 110, None, None, None, None, None),
|
||||
("Заглушка для раструба 160 мм", accessories_category_id, "заглушка", 160, None, None, None, None, None),
|
||||
("Ревизия 110 мм", accessories_category_id, "ревизия", 110, None, None, None, None, None),
|
||||
("Ревизия 160 мм", accessories_category_id, "ревизия", 160, None, None, None, None, None),
|
||||
]
|
||||
|
||||
for name, cat_id, fitting_type, diameter, thickness, length, color, app_type, angle in fittings:
|
||||
|
||||
Reference in new issue
Block a user