I want top perform django orm that selects first 3 word of letter as diustinct selection
I have model as below:
class Phone(models.Model):
country = models.ForeignKey(Country, on_delete=models.CASCADE)
name = models.CharField(max_length=2050,null=True,blank=True)
slug = models.SlugField(max_length=2050,null=True,blank=True)
** sample values of name are **
Xiomi redmi note red ...., Xiomi redmi note blue ...., samsung galaxy s10 red ..., samsung galaxy s10 blue ...,
i want to extract the distinct queryset that has first three word as common
For example: Xiomi redmi note, samsung galaxy s10 as a resilt query set