+self to string

This commit is contained in:
jp.av.dev 2020-11-13 01:18:02 -03:00
parent afd417c728
commit 31bc6798fe

View File

@ -13,6 +13,8 @@ class Articulos(models.Model):
seccion = models.CharField(max_length=20)
precio = models.IntegerField()
def __str__(self):
return 'Nombre: %s, Depto. %s, Precio $ %s' % (self.nombre, self.seccion, self.precio)
class Pedidos (models.Model):
numero = models.IntegerField()