I've coded a generic filter for this operations, it's working with date, number, string or list
Take a look at https://gist.github.com/zorky/47e808146b6dc00f1e09335b03418344 For example, URL is like : https://domain.ntld/api/view/?field_operator= threshold||number||lte||30 : filtering threshold field wich is <= 30 you can accumulate filters, ie : https://domain.ntld/api/view/? field_operator=threshold||number||lte||30&field_operator=date_created||date||eq||2019-04-01 : filtering threshlod <= 30 and date_created = 2019-04-01 Le jeudi 3 janvier 2019 23:57:29 UTC+1, Foobar a écrit : > > Has anyone successfully used DRF to make API calls using gte, lte, and > range? If so, what extension did you use? I've tried django-filters and > django-rest-framework-filters but neither work as stated. If someone can > share their code that would be much appreciated. Thanks. > > > -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
