2020-11-13 01:14:23 -03:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
|
|
|
class Clientes(models.Model):
|
|
|
|
nombre = models.CharField(max_length=30)
|
|
|
|
direccion = models.CharField(max_length=50)
|
|
|
|
email = models.EmailField()
|
|
|
|
fono = models.CharField(max_length=10)
|
|
|
|
|
|
|
|
|
|
|
|
class Articulos(models.Model):
|
|
|
|
nombre = models.CharField(max_length=30)
|
|
|
|
seccion = models.CharField(max_length=20)
|
|
|
|
precio = models.IntegerField()
|
2020-11-13 01:18:02 -03:00
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return 'Nombre: %s, Depto. %s, Precio $ %s' % (self.nombre, self.seccion, self.precio)
|
2020-11-13 01:14:23 -03:00
|
|
|
|
|
|
|
class Pedidos (models.Model):
|
|
|
|
numero = models.IntegerField()
|
|
|
|
fecha = models.DateField()
|
|
|
|
entregado = models.BooleanField()
|
|
|
|
|
|
|
|
|