I have model shop
shop
class Shop(models.Model):
CATEGORY = (
('BookShop', 'Bookshop'),
('Bakery', 'Bakery'),
('Dairy', 'Dairy'),
Shop_category = models.CharField(max_length=200, null=True, choices=CATEGORY)
Distance = models.PositiveIntegerField(null=True,)
Shop_location = models.PointField(null=True)
I want to set filter on choice field and distance.
The point field get location of user and calculate distance between shop and user
how i can set so that if the distance calculated between shop and user less then are equal to distance given by shop then shop will print and one more condition choice filed it is compulsory to match?