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') |