So I have a similar model:
class Whatever(SlugMixin, models.Model):
user = models.ForeignKey(auth_models.User, related_name='user+', verbose_name=_('User'), on_delete=models.PROTECT)
name = models.CharField(verbose_name=_('Name'), max_length=200)
I am trying to find all objects that belong to that user and that have a name which matches the searched term.
I have already understood that doing:
SearchQuerySet().filter(text=searched_term).filter(user=user)
won't work. It returns to me the union of those two. However, I want the intersection of those two conditions, and not the union. I understand that this happens because the user and text belong to different models.