From 1c4f1814e9c8b68ad929102286c9655f156f5d73 Mon Sep 17 00:00:00 2001 From: zein Date: Mon, 3 Nov 2025 01:52:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B8=D1=81=D0=BA=20=D0=BF=D0=BE?= =?UTF-8?q?=20=D1=82=D0=B5=D0=B3=D0=B0=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hentai_manga_model/models.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Hentai_manga_model/models.py b/Hentai_manga_model/models.py index 77f6067..d8e114b 100644 --- a/Hentai_manga_model/models.py +++ b/Hentai_manga_model/models.py @@ -1,6 +1,14 @@ +import os from pymongo import MongoClient -client = MongoClient('mongodb://localhost:27017/') +MONGO_URI = os.getenv('MONGO_URI', 'mongodb://zein:Demius626@mongodb:27017/hentai_db') + +#Для работы на сервере +client = MongoClient(MONGO_URI) + +# Для локальной разработки +#client = MongoClient('mongodb://localhost:27017/') + db = client['Manga'] # Название базы данных manga_collection = db['Hentai_Manga'] # Название коллекции