site stats CSV should now work (bug 738345)

This commit is contained in:
Davor Spasovski 2012-03-29 00:01:05 -07:00
Родитель 7d7e3a6f4b
Коммит 4f00f9698e
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -541,6 +541,13 @@ def site_series(request, format, group, start, end, field):
'date': row['date'],
'count': row['data'][field],
})
# TODO: (dspasovski) check whether this is the CSV data we really want
if format == 'csv':
series, fields = csv_fields(series)
return render_csv(request, None, series,
['date', 'count'] + list(fields),
title='addons.mozilla.org week Site Statistics',
show_disclaimer=True)
return render_json(request, None, series)