diff options
| author | Michael Wood <michael.g.wood@intel.com> | 2015-09-28 21:45:17 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-29 14:11:36 +0100 |
| commit | 8948d04bfd0dc84dda8d6575a7b4ed4ac6e73a15 (patch) | |
| tree | 5641a06a64fe840b40713c2be4923adc12dd3b3a | |
| parent | c1157cff9f6a620d63f79e2c465b1cf0e89c3c33 (diff) | |
| download | poky-8948d04bfd0dc84dda8d6575a7b4ed4ac6e73a15.tar.gz | |
bitbake: toaster: ToasterTable remove unused class definition
Remove ToasterTemplateView as this isn't used by anything.
(Bitbake rev: aa0b2dc6789cb6ae12511a4a930a4118337a162e)
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>
| -rw-r--r-- | bitbake/lib/toaster/toastergui/widgets.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index d7d5efdb0f..e58dd7c236 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py | |||
| @@ -349,33 +349,6 @@ class ToasterTable(TemplateView): | |||
| 349 | return data | 349 | return data |
| 350 | 350 | ||
| 351 | 351 | ||
| 352 | class ToasterTemplateView(TemplateView): | ||
| 353 | # renders a instance in a template, or returns the context as json | ||
| 354 | # the class-equivalent of the _template_renderer decorator for views | ||
| 355 | |||
| 356 | def __init__(self, *args, **kwargs): | ||
| 357 | super(ToasterTemplateView, self).__init__(*args, **kwargs) | ||
| 358 | self.context_entries = [] | ||
| 359 | |||
| 360 | def get(self, *args, **kwargs): | ||
| 361 | if self.request.GET.get('format', None) == 'json': | ||
| 362 | from django.core.urlresolvers import reverse | ||
| 363 | from django.shortcuts import HttpResponse | ||
| 364 | from views import objtojson | ||
| 365 | from toastergui.templatetags.projecttags import json as jsonfilter | ||
| 366 | |||
| 367 | context = self.get_context_data(**kwargs) | ||
| 368 | |||
| 369 | for x in context.keys(): | ||
| 370 | if x not in self.context_entries: | ||
| 371 | del context[x] | ||
| 372 | |||
| 373 | context["error"] = "ok" | ||
| 374 | |||
| 375 | return HttpResponse(jsonfilter(context, default=objtojson ), | ||
| 376 | content_type = "application/json; charset=utf-8") | ||
| 377 | |||
| 378 | return super(ToasterTemplateView, self).get(*args, **kwargs) | ||
| 379 | 352 | ||
| 380 | class ToasterTypeAhead(View): | 353 | class ToasterTypeAhead(View): |
| 381 | """ A typeahead mechanism to support the front end typeahead widgets """ | 354 | """ A typeahead mechanism to support the front end typeahead widgets """ |
