+self to string
This commit is contained in:
parent
afd417c728
commit
31bc6798fe
@ -13,6 +13,8 @@ class Articulos(models.Model):
|
|||||||
seccion = models.CharField(max_length=20)
|
seccion = models.CharField(max_length=20)
|
||||||
precio = models.IntegerField()
|
precio = models.IntegerField()
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return 'Nombre: %s, Depto. %s, Precio $ %s' % (self.nombre, self.seccion, self.precio)
|
||||||
|
|
||||||
class Pedidos (models.Model):
|
class Pedidos (models.Model):
|
||||||
numero = models.IntegerField()
|
numero = models.IntegerField()
|
||||||
|
Loading…
Reference in New Issue
Block a user