django-orchestra-test/orchestra/admin/dashboard.py

21 lines
471 B
Python
Raw Normal View History

2014-05-08 16:59:35 +00:00
from django.conf import settings
from orchestra.core import services
def generate_services_group():
models = []
2015-04-02 16:14:55 +00:00
for model, options in services.get().items():
2014-05-08 16:59:35 +00:00
if options.get('menu', True):
models.append("%s.%s" % (model.__module__, model._meta.object_name))
settings.FLUENT_DASHBOARD_APP_GROUPS += (
('Services', {
'models': models,
2014-11-12 12:45:37 +00:00
'collapsible': True,
2014-05-08 16:59:35 +00:00
}),
)
generate_services_group()