From 3093500be0ba63c8e80917cf23f402552f597a47 Mon Sep 17 00:00:00 2001 From: pilot <657434@03b.ru> Date: Mon, 10 Aug 2026 15:44:13 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D1=91=D0=BD:=20restoran=5Fmax=5Fbot/settings.py=20?= =?UTF-8?q?=E2=80=94=20=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20STATIC=5FURL=20=D0=BD=D0=B0=20'/static/'=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D1=84=D0=BE=D1=80=D0=BC=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BF=D1=83=D1=82=D0=B5=D0=B9?= =?UTF-8?q?.=20=E2=9C=85=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D1=91?= =?UTF-8?q?=D0=BD:=20restoran=5Fmax=5Fbot/promo=5Fhandlers.py=20=E2=80=94?= =?UTF-8?q?=20=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE?= =?UTF-8?q?=20=D1=84=D0=BE=D1=80=D0=BC=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20URL=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=BC=D0=BE-QR=20=D1=81=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=D0=BC=20STATIC=5FURL?= =?UTF-8?q?=20(=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D1=81=20=D0=B2?= =?UTF-8?q?=D0=B5=D0=B4=D1=83=D1=89=D0=B8=D0=BC=20=D1=81=D0=BB=D0=B5=D1=88?= =?UTF-8?q?=D0=B5=D0=BC).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restoran_max_bot/restoran_max_bot/promo_handlers.py | 2 +- restoran_max_bot/restoran_max_bot/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/restoran_max_bot/restoran_max_bot/promo_handlers.py b/restoran_max_bot/restoran_max_bot/promo_handlers.py index 28764e1..da50fb5 100644 --- a/restoran_max_bot/restoran_max_bot/promo_handlers.py +++ b/restoran_max_bot/restoran_max_bot/promo_handlers.py @@ -75,7 +75,7 @@ def bot_promo(client: Client, message: dict, settings_max: dict) -> bool: os.makedirs(promo_dir, exist_ok=True) img.save(os.path.join(promo_dir, file_name)) - # Формируем URL через STATIC_URL (с учётом BASE_URL) + # Формируем URL через STATIC_URL (с учётом ведущего слеша) qr_url = f"{BASE_URL}{STATIC_URL}promo/{file_name}" # Выводим ссылки в консоль для отладки diff --git a/restoran_max_bot/restoran_max_bot/settings.py b/restoran_max_bot/restoran_max_bot/settings.py index ff8f8a1..0ab40ec 100644 --- a/restoran_max_bot/restoran_max_bot/settings.py +++ b/restoran_max_bot/restoran_max_bot/settings.py @@ -139,7 +139,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/5.2/howto/static-files/ -STATIC_URL = 'static/' +STATIC_URL = '/static/' # Дополнительные директории для поиска статических файлов STATICFILES_DIRS = [(os.path.join(BASE_DIR, "static"))]