0👍
Sorry I can’t give this in a comment yet, have you looked into this yet? Django Generic JSON views. Seems to me like it would fit nicely into your project and help with the output you need.
0👍
Your data is already output by the view. You can just convert to JSON as you serve it from within the view.
Great example provided by SimpleIsBetterThenComplex:
from django.http import JsonResponse
def profile(request):
data = {
'name': 'Vitor',
'location': 'Finland',
'is_active': True,
'count': 28
}
return JsonResponse(data)
- Chartjs-Chart.js is not Dynamically Updating when the firebase databse is updating. (Vue.js)
- Chartjs-How to create rounded bar graph with Angular 7 and Chartjs (v2)
Source:stackexchange.com