1👍
✅
Because objects.filter
is actually a function, you can pass it kwargs
just like a normal function. So in your example you could do something like:
def search(**kwargs):
jobs = list(Job.objects.filter(**kwargs))
search(point__distance_gte=(ref_pnt, D(**distance_from_point)))
search(point__distance_lte=(ref_pnt, D(**distance_from_point)))
- [Answer]-CSS stylesheet not updated in browser with DJango+Apache+Firefox on VirtualBox Ubuntu Guest
Source:stackexchange.com