Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# -*- coding: utf-8 *-*
from django.db import models
class Propietario(models.Model):
propietario = models.CharField(max_length=255)
class Vehiculo(models.Model):
clase = models.CharField(max_length=255)
marca = models.CharField(max_length=25)
combustible = models.CharField(max_length=15)
carroseria = models.CharField(max_length=25)
class DetallePropitario(models.Model):
vehiculo = models.ForeignKey(Vehiculo)
propietario = models.ForeignKey(Propietario)
estado = models.BooleanField()
class Placa(models.Model):
numero = models.CharField(max_length=15)
estado = models.BooleanField()
vehiculo = models.ForeignKey(Vehiculo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment