[Answer]-How can I make two models appear on my Django homepage simultaneously?

1👍

This is simple. Write both function code in a single function.

def index(request):
    homepage = get_object_or_404(HomePage)
    latest_iconblurb = IconBlurb.objects.all()
    context = {'latest_iconblurb': latest_iconblurb; 'homepage':homepage}
    return render(request, 'homepage/blurb.html', context)

Leave a comment