Answer the question
In order to leave comments, you need to log in
How to display objects using Query Set?
There is a model that stores the id of cars (car) that may be of interest to the user in the cid field. How to display a list of cars (car) on the page by these id?
class ProbableCar(models.Model):
user = models.ManyToManyField(allauth_app_settings.USER_MODEL, editable=False)
cid = models.PositiveIntegerField()
class Car(models.Model):
user = models.ForeignKey(allauth_app_settings.USER_MODEL,
on_delete=models.CASCADE, default="", editable=False)
model = models.CharField(max_length=128, blank=True, null=True, default=" ")
type = models.CharField(max_length=3, blank=True, null=True, default="m", choices=TYPE_CHOICES)
buydate = models.DateField(blank=True, null=True, default= " ")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question