W
W
welc322019-06-23 11:54:27
Django
welc32, 2019-06-23 11:54:27

How to find inclusions?

There is a model

class Wall(models.Model):
    author = models.ForeignKey('Profile', on_delete=models.CASCADE)
    post_id = models.IntegerField(default=0)
    ...

There is a "spisok" list of type Profile
How can I select Wall records whose author is in the "skisok" list?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-06-23
@welc32

Wall.objects.filter(author__in=spisok)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question