<table class="table table-striped table-hover">
  <thead>
    <tr>
      <th width="35%">Nombre</th>
      <th>Precio</th>
      <th>Stock</th>
      <th>Imagen</th>
      <th>Fecha de Creación</th>
      <th>Acciones</th>
    </tr>
  </thead>
  <tbody> {% for postre in object_list %} <tr>
      <td>{{ postre.nombre }}</td>
      <td>{{ postre.precio }}</td>
      <td>{{ postre.stock }}</td>
      <td width="20%">
        <img src="{% static 'uploads/'%}{{postre.img}}" alt="{{postre.nombre}}" class="img-fluid" width="7%">
      </td>
      <!-- Formatear Fecha y Hora -->
      <td>{{ postre.created_at | date:"d-m-Y h:m" }}</td> 
      <!-- Fin Formatear Fecha y Hora --> 
      <td>
        <form method="POST" action="eliminar/{{postre.id}}"> {% csrf_token %} <div class="btn-group">
            <a href="detalle/{{postre.id}}" title="Ver" type="button" class="btn btn-success">Ver </a>
            <a href="editar/{{postre.id}}" title="Editar" type="button" class="btn btn-primary">Editar </a>
            <button class="btn btn-danger" onclick="return eliminar();" type="submit"> Eliminar </button>
            <!-- <a href="eliminar/{{postre.id}}" title="Eliminar"><i class="fas fa-trash"></i></a> -->
          </div>
        </form>
      </td>
    </tr> {% endfor %} </tbody>
</table> 