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.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-06-29 16:44:41 +03:00
parent f8a34f7ae0
commit 090d2fc457

View file

@ -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", ""],