Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

TemplateDoesNotExist error when adding a new dashboard

Hello, When I add an dashboard into /usr/share/openstack-dashboard/openstack_dashboard/dashboards add I create configure files in /usr/share/openstack-dashboard/openstack_dashboard/local/enabled The details are appended in the end. But When I restart the httpd.service and memcached.service, and try to open the dashboard in browser, It gave an "TemplateDoesNotExist" error.

TemplateDoesNotExist at /monitor/
Template-loader postmortem

Django tried loading these templates, in this order:
Using loader horizon.themes.ThemeTemplateLoader:
/usr/share/openstack-dashboard/openstack_dashboard/themes/default/templates/monitor/info/index.html (File does not exist)
Using loader django.template.loaders.filesystem.Loader:
/usr/share/openstack-dashboard/openstack_dashboard/templates/monitor/info/index.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
/usr/share/openstack-dashboard/openstack_dashboard/templates/monitor/info/index.html (File does not exist)
/usr/lib/python2.7/site-packages/django/contrib/auth/templates/monitor/info/index.html (File does not exist)
/usr/lib/python2.7/site-packages/compressor/templates/monitor/info/index.html (File does not exist)
/usr/lib/python2.7/site-packages/horizon/templates/monitor/info/index.html (File does not exist)
Using loader horizon.loaders.TemplateLoader:

 # The name of the dashboard to be added to HORIZON['dashboards']. Required.
DASHBOARD = 'monitor'

# If set to True, this dashboard will not be added to the settings.




 PANEL = 'monitor_info_panel'
  PANEL_DASHBOARD = 'monitor'
  PANEL_GROUP = 'monitor'
  ADD_PANEL = ''
  DEFAULT_PANEL = 'monitor_info_panel'

#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

from django.utils.translation import ugettext_lazy as _

from openstack_auth import utils

import horizon

from django.conf import settings

class Monitor(horizon.Dashboard):
    name = _("Monitor")
    slug = "monitor"
    if getattr(settings, 'POLICY_CHECK_FUNCTION', None):
        policy_rules = (('monitor_info_panel', 'admin_required'),)
        permissions = (tuple(utils.get_admin_permissions()),)

from django.utils.translation import ugettext_lazy as _

import horizon

class Info(horizon.Panel):
    name = _("Monitoring Information")
    slug = 'monitor_info_panel'