From 8948d04bfd0dc84dda8d6575a7b4ed4ac6e73a15 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 28 Sep 2015 21:45:17 -0700 Subject: bitbake: toaster: ToasterTable remove unused class definition Remove ToasterTemplateView as this isn't used by anything. (Bitbake rev: aa0b2dc6789cb6ae12511a4a930a4118337a162e) Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/widgets.py | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'bitbake') 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): return data -class ToasterTemplateView(TemplateView): - # renders a instance in a template, or returns the context as json - # the class-equivalent of the _template_renderer decorator for views - - def __init__(self, *args, **kwargs): - super(ToasterTemplateView, self).__init__(*args, **kwargs) - self.context_entries = [] - - def get(self, *args, **kwargs): - if self.request.GET.get('format', None) == 'json': - from django.core.urlresolvers import reverse - from django.shortcuts import HttpResponse - from views import objtojson - from toastergui.templatetags.projecttags import json as jsonfilter - - context = self.get_context_data(**kwargs) - - for x in context.keys(): - if x not in self.context_entries: - del context[x] - - context["error"] = "ok" - - return HttpResponse(jsonfilter(context, default=objtojson ), - content_type = "application/json; charset=utf-8") - - return super(ToasterTemplateView, self).get(*args, **kwargs) class ToasterTypeAhead(View): """ A typeahead mechanism to support the front end typeahead widgets """ -- cgit v1.2.3-54-g00ecf