+views.py

This commit is contained in:
jp.av.dev 2020-11-15 02:20:29 -03:00
parent 73052ad7d4
commit a9f01f8dc9

View File

@ -1,18 +1,18 @@
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, verbose_name = "La Direcc.:") direccion = models.CharField(max_length=50, verbose_name="La Direcc.:")
email = models.EmailField(blank = True, null = True) email = models.EmailField(blank=True, null=True)
fono = models.CharField(max_length = 10) fono = models.CharField(max_length=10)
def __str__(self): def __str__(self):
return (self.nombre) return (self.nombre)
class Articulos(models.Model): 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): def __str__(self):
@ -23,3 +23,4 @@ class Pedidos (models.Model):
numero = models.IntegerField() numero = models.IntegerField()
fecha = models.DateField() fecha = models.DateField()
entregado = models.BooleanField() entregado = models.BooleanField()