I 'm not sure if that is a JSON file because a JSON file is nothing but a python dictionary like structure and that doesn't seem to be that. Anyways you can see python's building json module's json.dumps() function.
Sent from Mail for Windows 10
From: HJ
Sent: 22 May 2020 23:18
To: Django users
Subject: JSON file
hello django users hope you are doing well
I want to do a highchart using a json file , and that's the problem I am facing , I want to create a json file in my views.py based on my columns below "countDeliveries"and "Dates"
class mail_item_count_deliveries_perDate(models.Model):
countDeliveries = models.IntegerField(default=0)
Dates = models.DateTimeField()
myJSON file should be something like that:
[
[
Dates,
countDeliveries
],
[
1167696000000,
5
],
- can you guys help me out
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/65341e88-88b1-480f-9d9a-39ce909ee4da%40googlegroups.com.
No comments:
Post a Comment