11/20/2023 0 Comments Budidaya tanaman pisang pdfTherefore the following calls to serialize it from re import serializers output = rialize('json', result) fail with the following error: AttributeError: 'dict' object has no attribute '_meta' Any suggestions on serialization without omitting the.values() as I need them for brevity.Ĭreating a JSON response using Django and Python. filter(timestamp_gte=start_day, timestamp_lte=end_day, request_isnull=False, name=EventType.COMPLETED).annotate(date=TruncDay('timestamp')).values('date').annotate(completed_count=Count('id')).order_by('date') The main thing is the.values() statement that makes this statement return a QuerySet that contains a dict rather than a Django model instance. In Django 1.10 I am trying to serialize an QuerySet that I obtained from the following query: events_in_period = Event.objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |