[Fixed]-Issue using Django to pass JSON to Javascript

1👍

You data is encoded as JSON twice. I have had it working like shown below:

def getTweets(request, tag):
    d = {'string': tag}
    data = tweets.objects.filter(tag = tag).values('id', 'tweet', 'whatever')
    data = JsonResponse(list(data), safe=False)
    print data


    return data

Leave a comment