Refactor MongoDB client imports and implement lazy loading for main items in UI

This commit is contained in:
2026-04-12 17:36:49 +02:00
parent c078de0076
commit 0f372f5056
7 changed files with 151 additions and 25 deletions
+1 -1
View File
@@ -33,7 +33,6 @@ import ausleihung as au
import audit_log as al
import datetime
from apscheduler.schedulers.background import BackgroundScheduler
from pymongo import MongoClient
from bson.objectid import ObjectId
from urllib.parse import urlparse, urlunparse
import requests
@@ -59,6 +58,7 @@ import subprocess
# Set base directory and centralized settings
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
import settings as cfg
from settings import MongoClient
app = Flask(__name__, static_folder='static') # Correctly set static folder