Multiple Image upload like ecommerce application

I just looked a tutorial of a course I did. First I go to the “main” model and from there I am referencing to the child-model and get all objects. That would be my best guess so far
I am looking forward your answer.
Thanks

projects = project.projectimage.objects.all()

After my lated research this would be my solution
views.py

def projects(request):
    projects = Project.objects.all().prefetch_related('projectimage_set')
    context = {"projects":projects}
    return render(request, 'projects/projects.html', context)

projects.html

{% for projectimage in project.projectimage_set.all %}
  <img src="{{projectimage.image.url}}"/>
{% endfor %}
1 Like

Can you send the full code upto models.py forms.py and viewe.py with template i m facing this issue past two days