+self to string
This commit is contained in:
parent
afd417c728
commit
31bc6798fe
@ -12,7 +12,9 @@ class Articulos(models.Model):
|
|||||||
nombre = models.CharField(max_length=30)
|
nombre = models.CharField(max_length=30)
|
||||||
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