from django.db import models
import string
import random


def random_chassis(size=17, chars=string.ascii_uppercase + string.digits):
    v = ''.join(random.choice(chars) for _ in range(size))
    return v


class Car(models.Model):
    marca = models.CharField(max_length=75, null=False)
    modelo = models.CharField(max_length=75, null=False)
    placa = models.CharField(max_length=25, null=False)
    ano = models.CharField(max_length=4, null=True)
    cor = models.CharField(max_length=50, null=False)
    chassi = models.CharField(max_length=50, null=False)

    def __str__(self):
        return self.marca + ' - ' + self.modelo

8ff29191b39a6b38a9f1c125f356c3727ee00f88
<mask token>


class Car(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Car(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __str__(self):
        return self.marca + ' - ' + self.modelo

<mask token>


class Car(models.Model):
    marca = models.CharField(max_length=75, null=False)
    modelo = models.CharField(max_length=75, null=False)
    placa = models.CharField(max_length=25, null=False)
    ano = models.CharField(max_length=4, null=True)
    cor = models.CharField(max_length=50, null=False)
    chassi = models.CharField(max_length=50, null=False)

    def __str__(self):
        return self.marca + ' - ' + self.modelo

<mask token>


def random_chassis(size=17, chars=string.ascii_uppercase + string.digits):
    v = ''.join(random.choice(chars) for _ in range(size))
    return v


class Car(models.Model):
    marca = models.CharField(max_length=75, null=False)
    modelo = models.CharField(max_length=75, null=False)
    placa = models.CharField(max_length=25, null=False)
    ano = models.CharField(max_length=4, null=True)
    cor = models.CharField(max_length=50, null=False)
    chassi = models.CharField(max_length=50, null=False)

    def __str__(self):
        return self.marca + ' - ' + self.modelo

from django.db import models
import string
import random


def random_chassis(size=17, chars=string.ascii_uppercase + string.digits):
    v = ''.join(random.choice(chars) for _ in range(size))
    return v


class Car(models.Model):
    marca = models.CharField(max_length=75, null=False)
    modelo = models.CharField(max_length=75, null=False)
    placa = models.CharField(max_length=25, null=False)
    ano = models.CharField(max_length=4, null=True)
    cor = models.CharField(max_length=50, null=False)
    chassi = models.CharField(max_length=50, null=False)

    def __str__(self):
        return self.marca + ' - ' + self.modelo
