fix error when displaying dashboards in home view
authorScott Baker <smbaker@gmail.com>
Tue, 23 Dec 2014 17:39:06 +0000 (09:39 -0800)
committerScott Baker <smbaker@gmail.com>
Tue, 23 Dec 2014 17:39:06 +0000 (09:39 -0800)
planetstack/core/dashboard/views/home.py
planetstack/core/models/dashboard.py

index c0acfdf..7aaa9b3 100644 (file)
@@ -84,11 +84,11 @@ class DashboardDynamicView(TemplateView):
             body = body + '<div id="dashtab-%d">\n' % i
             if (view.controllers.all().count()>0):
                 body = body + '<select id="dashselect-%d">' % i;
-                for j,controllerdashboard in enumerate(view.controllerdashboards.all()):
+                for j,controllerdashboard in enumerate(view.controllerdashboardviews.all()):
                     body = body + '<option value="%d">%s</option>' % (j, controllerdashboard.controller.name)
                 body = body + '</select>'
 
-                for j,controllerdashboard in enumerate(view.controllerdashboards.all()):
+                for j,controllerdashboard in enumerate(view.controllerdashboardviews.all()):
                     body = body + '<div id="dashcontent-%d-%d" class="dashcontent-%d">\n' % (i,j,i)
                     body = body + self.embedDashboard(controllerdashboard.url);
                     body = body + '</div>\n';
index d26ac25..828acec 100644 (file)
@@ -14,8 +14,8 @@ class DashboardView(PlCoreBase):
 class ControllerDashboardView(PlCoreBase):
     objects = ControllerLinkManager()
     deleted_objects = ControllerLinkDeletionManager()
-    controller = models.ForeignKey(Controller, related_name='controllerdashboardViews')
-    dashboardView = models.ForeignKey(DashboardView, related_name='controllerdashboardViews')
+    controller = models.ForeignKey(Controller, related_name='controllerdashboardviews')
+    dashboardView = models.ForeignKey(DashboardView, related_name='controllerdashboardviews')
 
     url = models.CharField(max_length=1024, help_text="URL of Dashboard")