Ordering Objects

Report a typo

We have the House model with the following fields: street, house_number, apartments:

class House(models.Model):
    apartments = models.IntegerField()
    house_number = models.IntegerField()
    street = models.CharField(max_length=64)

Filter all houses on street by Elm st. and order them by house_number from the smallest to the largest.

Write a program in Python 3
elm_street_houses = ...
___

Create a free account to access the full topic