```
g = Goal.objects.filter(Q(title__contains=term) | Q(desc__contains=term))

```

How can I add to my `filter` that `user=request.user`?

This doesn't work:

```
g = Goal.objects.filter(user=request.user, Q(title__contains=term) | Q(desc__contains=term))

```

Models:

```
class Goal(models.Model):
    user = models.ForeignKey(User)
    title = models.CharField(max_length=255)
    desc = models.TextField()

```
['https://Stackoverflow.com/questions/21188760', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3207076/']
Keyword arguments (`user=request.user`) must come **after** non keyword arguments (your Q object).

Either switch the order in your filter:

```
Goal.objects.filter(Q(title__contains=term) | Q(desc__contains=term), user=request.user) 

```

or chain two `filter()` calls together

```
Goal.objects.filter(user=request.user).filter(Q(title__contains=term) | Q(desc__contains=term))

```
```
g = Goal.objects.filter(Q(user__iexact=request.user) & Q(title__contains=term) | Q(desc__contains=term))

```

Use & in place of Python and operator