|
@@ -9,7 +9,8 @@ from django.utils.formats import get_format
|
|
|
from django.utils.safestring import mark_safe
|
|
|
from jet import settings, VERSION
|
|
|
from jet.models import Bookmark, PinnedApplication
|
|
|
-from jet.utils import get_app_list, get_model_instance_label, get_model_queryset, get_possible_language_codes
|
|
|
+from jet.utils import get_app_list, get_model_instance_label, get_model_queryset, get_possible_language_codes, \
|
|
|
+ get_admin_site
|
|
|
|
|
|
try:
|
|
|
from urllib.parse import parse_qsl
|
|
@@ -55,8 +56,13 @@ def jet_get_menu(context):
|
|
|
app['models'] = []
|
|
|
|
|
|
app_list = []
|
|
|
+ settings_app_list = settings.JET_SIDE_MENU_CUSTOM_APPS
|
|
|
|
|
|
- for item in settings.JET_SIDE_MENU_CUSTOM_APPS:
|
|
|
+ if isinstance(settings_app_list, dict):
|
|
|
+ admin_site = get_admin_site(context)
|
|
|
+ settings_app_list = settings_app_list.get(admin_site.name, [])
|
|
|
+
|
|
|
+ for item in settings_app_list:
|
|
|
app_label, models = item
|
|
|
|
|
|
if app_label in app_dict:
|