README.md edited

This commit is contained in:
2024-12-06 10:45:08 +09:00
parent 09e4edee6b
commit 1aa387aa59
13921 changed files with 2057290 additions and 10 deletions

View File

@@ -0,0 +1,20 @@
from importlib import import_module
from jet.dashboard import settings
def get_current_dashboard(location):
if location == 'index':
path = settings.JET_INDEX_DASHBOARD
elif location == 'app_index':
path = settings.JET_APP_INDEX_DASHBOARD
else:
raise ValueError('Unknown dashboard location: %s' % location)
module, cls = path.rsplit('.', 1)
try:
module = import_module(module)
index_dashboard_cls = getattr(module, cls)
return index_dashboard_cls
except ImportError:
return None