Ember Django-Rest Filtering


Hello Everyone,

I am new to Ember and currently having a little problem making it work with Django Rest Framework.

When I query for a single record Ember sends a get request to “/persons?filter[email]=tomster@example.com”, however Django Rest Framework accepts query parameters in the form of “/persons?email=tomster@example.com”. So I was wondering how I could make them work together. I would be glad if you guys could help.

Best Regards


What you’ll need is a custom adapter to change your filter values into a format that your backend expects. I’d start here (https://guides.emberjs.com/v2.7.0/models/customizing-adapters/) for an overview of what is going on. This addon might then be something to use (haven’t examined it carefully though): https://github.com/dustinfarris/ember-django-adapter