Changes between Initial Version and Version 1 of Ticket #34013, comment 3
- Timestamp:
- Sep 16, 2022, 3:26:05 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34013, comment 3
initial v1 1 1 "It seems there is a lack of support JSONField in order_by queryset." 2 2 this is not true as JSONField based example queryset is working fine with order_by method 3 eg:4 """"5 class Dog(models.Model):6 name = models.CharField(max_length=200)7 data = models.JSONField(null=True)8 3 9 def __str__(self):10 return self.name11 """"12 4 13 >>> dogs = Dog.objects.all().order_by("data")14 >>> dogs15 <QuerySet [<Dog: stella>, <Dog: tuffy>, <Dog: shifu>, <Dog: milo>]>16 17 this is working ..18 can someone please tell me about this model attribute how does this assigned to the object19 or wheather i should start with annotate class?