diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-05-16 14:50:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-17 14:43:30 +0100 |
commit | 54bf7cce48547289489203812f2e01cb755f0db4 (patch) | |
tree | b744123fed2c7e15ab4d1a45c1dce988d3dd4a58 /bitbake/lib/toaster/toastergui/tables.py | |
parent | a906a09c730683ee14b84fd890d109f52c9e3b02 (diff) | |
download | poky-54bf7cce48547289489203812f2e01cb755f0db4.tar.gz |
bitbake: toaster: toastertables: Clean up and fix up a number of items
- Remove the unused 'computation' field
- Remove the code to try to make the tables behave like an api
- Remove custom JSON encoder in favour of DjangoJSONEncoder
- Simplify get_data and add comments
- Add exception type instead of using generic Exception
- Clean up python style warnings
(Bitbake rev: 16d8198e8f6668c5fa5467ff4bda86c5d66a6cad)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/tables.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/tables.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index d375da434f..d21bed1fbe 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py | |||
@@ -190,17 +190,6 @@ class LayersTable(ToasterTable): | |||
190 | static_data_name="add-del-layers", | 190 | static_data_name="add-del-layers", |
191 | static_data_template='{% include "layer_btn.html" %}') | 191 | static_data_template='{% include "layer_btn.html" %}') |
192 | 192 | ||
193 | project = Project.objects.get(pk=kwargs['pid']) | ||
194 | self.add_column(title="LayerDetailsUrl", | ||
195 | displayable = False, | ||
196 | field_name="layerdetailurl", | ||
197 | computation = lambda x: reverse('layerdetails', args=(project.id, x.id))) | ||
198 | |||
199 | self.add_column(title="name", | ||
200 | displayable = False, | ||
201 | field_name="name", | ||
202 | computation = lambda x: x.layer.name) | ||
203 | |||
204 | 193 | ||
205 | class MachinesTable(ToasterTable): | 194 | class MachinesTable(ToasterTable): |
206 | """Table of Machines in Toaster""" | 195 | """Table of Machines in Toaster""" |