django orm t code example
Example 1: django order by
class Meta:
ordering = ('date',)
Example 2: django filter values with OR operator
Blog.objects.filter(pk__in=[1, 4, 7])
class Meta:
ordering = ('date',)
Blog.objects.filter(pk__in=[1, 4, 7])