Example #1
0
def data(request):
    data = json.dumps(Sentiment.histogram())
    return HttpResponse(data, mimetype='application/json')
Example #2
0
def index(request):
    ctx = {'data': json.dumps(Sentiment.histogram())}
    return render(request, 'index.html', ctx)