summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/widgets.py
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-09-28 21:45:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 14:11:36 +0100
commit340b3983dbced604d6e9affc7fd5ccfdcc379e61 (patch)
tree36c174d6387e72311d2716e8b99020692b851c11 /bitbake/lib/toaster/toastergui/widgets.py
parente1851fe04c812d226b0d612732c0579a2bd83822 (diff)
downloadpoky-340b3983dbced604d6e9affc7fd5ccfdcc379e61.tar.gz
bitbake: toaster: tables Move the title and name into the widget
For historical reasons this was being set in the urls definition. We can set this in the actual definition of the table and defaults in the widget. (Bitbake rev: 2f7949caec3c9194328c35b2e075eaae85409efe) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/widgets.py')
-rw-r--r--bitbake/lib/toaster/toastergui/widgets.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py
index eb2914d87c..eb4969214f 100644
--- a/bitbake/lib/toaster/toastergui/widgets.py
+++ b/bitbake/lib/toaster/toastergui/widgets.py
@@ -45,7 +45,7 @@ class ToasterTable(TemplateView):
45 super(ToasterTable, self).__init__() 45 super(ToasterTable, self).__init__()
46 if 'template_name' in kwargs: 46 if 'template_name' in kwargs:
47 self.template_name = kwargs['template_name'] 47 self.template_name = kwargs['template_name']
48 self.title = None 48 self.title = "Table"
49 self.queryset = None 49 self.queryset = None
50 self.columns = [] 50 self.columns = []
51 self.filters = {} 51 self.filters = {}
@@ -61,6 +61,13 @@ class ToasterTable(TemplateView):
61 orderable=True, 61 orderable=True,
62 field_name="id") 62 field_name="id")
63 63
64 def get_context_data(self, **kwargs):
65 context = super(ToasterTable, self).get_context_data(**kwargs)
66 context['title'] = self.title
67 context['table_name'] = type(self).__name__.lower()
68
69 return context
70
64 71
65 def get(self, request, *args, **kwargs): 72 def get(self, request, *args, **kwargs):
66 if request.GET.get('format', None) == 'json': 73 if request.GET.get('format', None) == 'json':