From 090d2fc457e7c164443494965659d71ac5839b5d Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Sun, 29 Jun 2025 16:44:41 +0300 Subject: [PATCH] Features: 1) Support `COMPANY_NAME` variable for `site_brand`; 2) Add type annotations with `type: ignore` in `JAZZMIN_SETTINGS`; Fixes: 1) Update `search_model` to `None` to avoid incorrect search configurations; Extra: 1) Remove deprecated user menu links for a cleaner interface; 2) Minor adjustments for consistency in string formatting. --- evibes/settings/jazzmin.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/evibes/settings/jazzmin.py b/evibes/settings/jazzmin.py index 059c3f5d..51399f95 100644 --- a/evibes/settings/jazzmin.py +++ b/evibes/settings/jazzmin.py @@ -4,9 +4,9 @@ from evibes.settings.base import EVIBES_VERSION from evibes.settings.constance import CONSTANCE_CONFIG JAZZMIN_SETTINGS = { - "site_title": f"{CONSTANCE_CONFIG.get('PROJECT_NAME')[0]} Admin", - "site_header": CONSTANCE_CONFIG.get("PROJECT_NAME")[0], - "site_brand": "Wiseless", + "site_title": f"{CONSTANCE_CONFIG.get('PROJECT_NAME')[0]} Admin", # type: ignore + "site_header": str(CONSTANCE_CONFIG.get("PROJECT_NAME")[0]), # type: ignore + "site_brand": str(CONSTANCE_CONFIG.get("COMPANY_NAME")[0]), # type: ignore "site_logo": "logo.png", "login_logo": "logo.png", "login_logo_dark": "logo.png", @@ -14,7 +14,7 @@ JAZZMIN_SETTINGS = { "site_icon": "favicon.ico", "welcome_sign": "Whoa! Only admins allowed here!", "copyright": f"eVibes {EVIBES_VERSION} by Wiseless", - "search_model": ["vibes_auth.User", "core.Product", "core.Category", "core.Brand"], + "search_model": None, "user_avatar": "avatar", "topmenu_links": [ {"name": "Home", "url": "admin:index"}, @@ -26,9 +26,7 @@ JAZZMIN_SETTINGS = { {"model": "core.Category", "permissions": ["core.view_category"]}, {"model": "core.Brand", "permissions": ["core.view_brand"]}, ], - "usermenu_links": [ - {"name": _("Support"), "url": "https://t.me/fureunoir", "new_window": True}, - ], + "usermenu_links": [], "show_sidebar": True, "navigation_expanded": True, "hide_apps": ["django_celery_results", ""],