I have two querysets of model objects that I want to display one after another in an html page.
The first queryset contains a list of local restaurants and the other a list of chain restaurants. So my lists are defined as such:
local_restaurants = LocalRestaurants.objects.all()
chain_restaurants = ChainRestaurants.objects.all()
Is there a best practice for listing these restaurants one restaurant after another until the sets are depleted?
For example an html would display the restaurants like this:
localRestaurant1
chain_restaurant1
localRestaurant2
chain_restaurant2
localRestaurant3
chain_restaurant3
...
Edit If one of the sets is depleted then the other set should still continue until it is also depleted. So if one list has 3 objects and the other has 7, it should look like this:
localRestaurant1
chain_restaurant1
localRestaurant2
chain_restaurant2
localRestaurant3
chain_restaurant3
localRestaurant4
localRestaurant5
localRestaurant6
localRestaurant7