Scott Baker | c7325a4 | 2014-05-30 16:06:46 -0700 | [diff] [blame] | 1 | from view_common import * |
Scott Baker | 823b721 | 2014-06-16 10:25:39 -0700 | [diff] [blame] | 2 | import random |
Scott Baker | c7325a4 | 2014-05-30 16:06:46 -0700 | [diff] [blame] | 3 | |
| 4 | class DashboardAnalyticsAjaxView(View): |
| 5 | def get(self, request, name="hello_world", **kwargs): |
Scott Baker | 4879fca | 2014-05-30 16:10:35 -0700 | [diff] [blame] | 6 | if (name == "bigquery"): |
Scott Baker | c7325a4 | 2014-05-30 16:06:46 -0700 | [diff] [blame] | 7 | (mimetype, data) = DoPlanetStackAnalytics(request) |
Scott Baker | 823b721 | 2014-06-16 10:25:39 -0700 | [diff] [blame] | 8 | return HttpResponse(data, content_type=mimetype) |
Scott Baker | c7325a4 | 2014-05-30 16:06:46 -0700 | [diff] [blame] | 9 | else: |
Scott Baker | 823b721 | 2014-06-16 10:25:39 -0700 | [diff] [blame] | 10 | return HttpResponse(json.dumps("Unknown"), content_type='application/javascript') |