summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/toastergui/widgets.py27
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
352class 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
380class ToasterTypeAhead(View): 353class ToasterTypeAhead(View):
381 """ A typeahead mechanism to support the front end typeahead widgets """ 354 """ A typeahead mechanism to support the front end typeahead widgets """