[image: Capture.JPG] Enter code here... #django templates
{% extends 'base.html' %} {% block content %} <h1>Products</h1> <div class="row"> {% for product in products %} <div class="col"> <div class="card" style="width: 18rem;"> <img src="{{product.image}}.jpg" class="card-img-top" alt="..."> <div class="card-body"> <h5 class="card-title">{{product.name}}</h5> <p class="card-text">$ {{product.price}}</p> <a href="#" class="btn btn-primary">add to card</a> </div> </div> </div> {% endfor %} </div> {% endblock %}... #python code class Product(models.Model): name = models.CharField(max_length=50) price = models.FloatField() image = models.FileField() -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a9354269-5866-4332-9acb-a0b558501d0d%40googlegroups.com.