How to collect data from google form and store in JsonField in Django?
I am expecting to collect all the responses and save them in my database in JsonField Any help would be appreciated. Thanks in advance :)
You could try requests
import requests
url = ""
response = requests.get(url).json
response will be a dictionary of your json web response
import requests
from django.db import models
class foo(models.Model):
data = models.JSONField()
url = ""
response = requests.get(url).json
foo.objects.create(data=response)
Docs:
https://docs.djangoproject.com/en/3.2/releases/3.1/#jsonfield-for-all-supported-database-backends