How to get specific column from model in Django( SELECT city FROM advert ) and how to display the city repeated only once?(I have London x3)
My model:
class Advert(models.Model):
title = models.CharField(max_length=255)
company = models.CharField(max_length=255)
city = models.CharField(max_length=255)
Try
Or
Also, Checking the doc is a must to take advantage of Django ORM QuerySet.