update model
This commit is contained in:
parent
617771f4d5
commit
73052ad7d4
@ -1,12 +1,14 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Clientes(models.Model):
|
class Clientes(models.Model):
|
||||||
nombre = models.CharField(max_length = 30)
|
nombre = models.CharField(max_length = 30)
|
||||||
direccion = models.CharField(max_length=50)
|
direccion = models.CharField(max_length = 50, verbose_name = "La Direcc.:")
|
||||||
email = models.EmailField()
|
email = models.EmailField(blank = True, null = True)
|
||||||
fono = models.CharField(max_length = 10)
|
fono = models.CharField(max_length = 10)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return (self.nombre)
|
||||||
|
|
||||||
|
|
||||||
class Articulos(models.Model):
|
class Articulos(models.Model):
|
||||||
nombre = models.CharField(max_length = 30)
|
nombre = models.CharField(max_length = 30)
|
||||||
@ -16,9 +18,8 @@ class Articulos(models.Model):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return 'Nombre: %s, Depto. %s, Precio $ %s' % (self.nombre, self.seccion, self.precio)
|
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()
|
||||||
fecha = models.DateField()
|
fecha = models.DateField()
|
||||||
entregado = models.BooleanField()
|
entregado = models.BooleanField()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user