blob: 8ccb7c5fc3cf367ec42bed8109071f95f04bf442 [file] [log] [blame]
from view_common import *
import random
from planetstack_analytics import DoPlanetStackAnalytics
class DashboardAnalyticsAjaxView(View):
url = r'^analytics/(?P<name>\w+)/$'
def get(self, request, name="hello_world", **kwargs):
if (name == "bigquery"):
(mimetype, data) = DoPlanetStackAnalytics(request)
return HttpResponse(data, content_type=mimetype)
else:
return HttpResponse(json.dumps("Unknown"), content_type='application/javascript')