-2
from django_filters import FilterSet
from django.db import models
Pessoa(models.Model):
nome= models.TextField()
Marca(models.Model):
nome = models.TextField()
Carro(models.Model):
pessoa = models.ForeignKey(Pessoa, on_delete=models.CASCADE, related_name='carros')
marca = models.ForeignKey(Marca, on_delete=models.CASCADE)
data_do_documento = models.DateTimeField()
class FilterPessoa(FilterSet):
...
class Meta:
model = Pessoa
...
How do I apply a python/Django filter, of all people who have fiat and/or jeep cars, and have document date between 01/07/2020 and 31/07/2020
Hey there, Jose Augusto. That would not be the problem because the filter I want is for all the people who have Fiat and Jeep cars, regardless of the name of the person. However thank you very much.
– eliaquim