I have a model Bannerwith imageand fields name. I need data from this model that will be displayed in groups of three on a moving Bootstrap cassette.
My current implementation is the most expensive and easiest I could think of.
banner1 = Banners.objects.filter(id__exact=1) repeated for 9 entries in the model.
My question is, can I split one query
Banners.objects.all()into three groups of three records, and then how can I display three groups on three different slides of the Bootstrap carousel?
source
share