From 874107d5b178f2e00adc35de6809f155de11f50a Mon Sep 17 00:00:00 2001 From: Gabriel Hurley Date: Sun, 13 May 2012 15:43:41 -0700 Subject: [PATCH] Panel scaffolding fixes. Adds a missing class name to registration (Fixes bug 999358) Cleans up the example template path (fixes bug 999363) Change-Id: Idf5a38cad31872e05c47f918b4f729f70db3ae0d --- horizon/conf/panel_template/panel.py | 2 +- horizon/conf/panel_template/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/horizon/conf/panel_template/panel.py b/horizon/conf/panel_template/panel.py index 3c1d85a9f..4364438e2 100644 --- a/horizon/conf/panel_template/panel.py +++ b/horizon/conf/panel_template/panel.py @@ -10,4 +10,4 @@ class {{ panel_name|title }}(horizon.Panel): slug = "{{ panel_name|slugify }}" -dashboard.register({{ panel_name|title }}) +dashboard.{{ dash_name|title }}.register({{ panel_name|title }}) diff --git a/horizon/conf/panel_template/views.py b/horizon/conf/panel_template/views.py index 78cd9d30c..a5116ca48 100644 --- a/horizon/conf/panel_template/views.py +++ b/horizon/conf/panel_template/views.py @@ -3,7 +3,7 @@ from horizon import views class IndexView(views.APIView): # A very simple class-based view... - template_name = '{{ panel_name }}/index.html' + template_name = '{{ dash_name }}/{{ panel_name }}/index.html' def get_data(self, request, context, *args, **kwargs): # Add data to the context here...