How do I get DateTimeField from the Mysql database in Django in JSON format? I got an error when I executed the code Date.time cannot be serialized in json
(data holds a lot of values):
data = json.dumps(data)
But this was fixed by adding
ALL_data = serializers.serialize("json", data, ensure_ascii=False)
But now I get 'str' object has no attribute '_meta'
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…