Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Product(models.Model):
- price = models.FloatField()
- name = models.CharField(max_length=100)
- group = models.CharField(max_length=100)
- Product.objects.order_by('group','price').distinct('group').order_by('price')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement