philipn/django-rest-framework-filters

filter on two model

Sarthak77tiwari opened this issue · 1 comments

I have two model shop1 and shop2

shop1

CATEGORY = (
    ('BookShop', 'Bookshop'),
    ('Bakery', 'Bakery'),
    ('Dairy', 'Dairy'),
)
Shop_category = models.CharField(max_length=200, choices=CATEGORY)
Your_location = models.PointField()

shop2

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()

i want set a filter where the the shop1 get the shame category of shop2 if the distnce given by shop2 less then or equall

Hi @Sarthak77tiwari. I can't really help you as the question isn't related to drf-filters.