openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #22110
Re: register a new panel in overrides.py
There's a couple of changes that you need to make...
First, edit the overrides.py file: (e.g., if we wanted to add the panel to the admin dashboard so this uses the admin dashboard slug: 'admin')
import horizon
from path_to_module.panel import YourNewPanelClass
admin_dashboard = horizon.get_dashboard("admin")
admin_dashboard.register(YourNewPanelClass)
Next, make sure your overrides.py file is being called in your settings.py
HORIZON_CONFIG = {
dashboards = ('project', 'admin','settings'),
...,
'customization_module': 'your_base_module.overrides'
}
-Dave
-----Original Message-----
From: openstack-bounces+david.lyle=hp.com@xxxxxxxxxxxxxxxxxxx [mailto:openstack-bounces+david.lyle=hp.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Wyllys Ingersoll
Sent: Wednesday, March 20, 2013 9:50 AM
To: openstack@xxxxxxxxxxxxxxxxxxx
Subject: [Openstack] register a new panel in overrides.py
Can someone give a pointer to how one goes about adding a new panel to an existing panel using overrides.py ?
I know my panel is working because if I hardcode it into an existing dashboard.py file, it is found and displayed. I'd prefer to put it in overrides.py instead and am wondering how that would be coded.
thanks,
Wyllys
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help : https://help.launchpad.net/ListHelp
Follow ups
References