Use horizon's panel template loader.

Moves the panel templates into their respective panel's directories.
This tightens the grouping of logically-related elements and reduces
the need to duplicate the entire dashboard structure in the dashboard's
templates directory.

Implements blueprint use-template-loader.

Change-Id: I05ffb6a96f4909c1285beda7874ccfa96404547f
This commit is contained in:
Gabriel Hurley 2012-06-19 14:00:40 -07:00
parent bb29bbf874
commit 0e40bdd572
90 changed files with 8 additions and 8 deletions

View File

@ -7,7 +7,7 @@
{% endblock page_header %}
{% block dash_main %}
{% include 'nova/objects/_copy.html' %}
{% include 'nova/containers/_copy.html' %}
{% endblock %}

View File

@ -7,7 +7,7 @@
{% endblock page_header %}
{% block dash_main %}
{% include 'nova/objects/_upload.html' %}
{% include 'nova/containers/_upload.html' %}
{% endblock %}

View File

@ -108,7 +108,7 @@ class ObjectViewTests(test.TestCase):
res = self.client.get(reverse('horizon:nova:containers:object_index',
args=[self.containers.first().name]))
self.assertTemplateUsed(res, 'nova/objects/index.html')
self.assertTemplateUsed(res, 'nova/containers/detail.html')
# UTF8 encoding here to ensure there aren't problems with Nose output.
expected = [obj.name.encode('utf8') for obj in self.objects.list()]
self.assertQuerysetEqual(res.context['objects_table'].data,
@ -118,7 +118,7 @@ class ObjectViewTests(test.TestCase):
def test_upload_index(self):
res = self.client.get(reverse('horizon:nova:containers:object_upload',
args=[self.containers.first().name]))
self.assertTemplateUsed(res, 'nova/objects/upload.html')
self.assertTemplateUsed(res, 'nova/containers/upload.html')
def test_upload(self):
container = self.containers.first()
@ -215,7 +215,7 @@ class ObjectViewTests(test.TestCase):
res = self.client.get(reverse('horizon:nova:containers:object_copy',
args=[self.containers.first().name,
self.objects.first().name]))
self.assertTemplateUsed(res, 'nova/objects/copy.html')
self.assertTemplateUsed(res, 'nova/containers/copy.html')
def test_copy(self):
container_1 = self.containers.get(name=u"container_one\u6346")

View File

@ -72,7 +72,7 @@ class CreateView(forms.ModalFormView):
class ObjectIndexView(tables.MultiTableView):
table_classes = (ObjectsTable, ContainerSubfoldersTable)
template_name = 'nova/objects/index.html'
template_name = 'nova/containers/detail.html'
def has_more_data(self, table):
return self._more
@ -131,7 +131,7 @@ class ObjectIndexView(tables.MultiTableView):
class UploadView(forms.ModalFormView):
form_class = UploadObject
template_name = 'nova/objects/upload.html'
template_name = 'nova/containers/upload.html'
def get_initial(self):
return {"container_name": self.kwargs["container_name"],
@ -171,7 +171,7 @@ def object_download(request, container_name, object_path):
class CopyView(forms.ModalFormView):
form_class = CopyObject
template_name = 'nova/objects/copy.html'
template_name = 'nova/containers/copy.html'
def get_form_kwargs(self):
kwargs = super(CopyView, self).get_form_kwargs()

View File

Can't render this file because it contains an unexpected character in line 1 and column 46.

View File

Can't render this file because it contains an unexpected character in line 1 and column 46.

View File

Can't render this file because it contains an unexpected character in line 1 and column 46.