I'm new to django, and I want to select last message of each thread:
`models.py`

```
class ChatMessage(models.Model):
    thread = models.ForeignKey('Thread', null=True, blank=True, on_delete=models.CASCADE)
    user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name="sender", on_delete=models.CASCADE)
    message = models.TextField(null=True)
    timestamp = models.DateTimeField(auto_now_add=True)
    voice = models.FileField(upload_to=upload_voice_dir, blank=True, null=True)

```

I'v no idea how to filter(I just know basics of filtering).
to sum it up I want the **last message** of **each thread**.