- # Choose a collection for main.
- try:
- ctx['collection'] = Collection.objects.filter(listed=True).order_by('?')[:1][0]
- except IndexError:
- pass
+ # Choose collections for main.
+ ctx['collections'] = Collection.objects.filter(listed=True).order_by('?')[:4]