mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
c1157cff9f
commit
8948d04bfd
@@ -349,33 +349,6 @@ class ToasterTable(TemplateView):
|
|||||||
return data
|
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):
|
class ToasterTypeAhead(View):
|
||||||
""" A typeahead mechanism to support the front end typeahead widgets """
|
""" A typeahead mechanism to support the front end typeahead widgets """
|
||||||
|
|||||||
Reference in New Issue
Block a user