-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuring the JSON root for DjangoRESTAdapter #104
Comments
I'm working on updating the adapter to properly support ember-data beta.10 (#101). I think I should be able to get pagination working but I'm not sure if I'll hit some problems yet. I'm a bit busy with other work now but I'm hoping to get back to this shortly. |
I'm looking at #101 and trying to fix those test failures. It looks like there's a lot of methods from Maybe it would be better to configure django-rest-framework to return the JSON format that |
Yeah, there's a some code for this by @Goldcap pointed to in #80 https://github.com/Goldcap/operis I think the adapter needs a full rework. I guess it's just easy to deal with this server side like you suggest but there's still a benefit to having an adapter work with the default django-rest json when you can't change the server bits. The code I have right now is processing the json into the right format on the JavaScript side instead of the server side. If you just want to get something going, you can always use the adapter with ember-data beta.8 with ember 1.7.0. I'm using it in a project and it seems to be working ok. |
Hey, thanks for the shoutout, and yes, I eventually decided to implement most of the changes in Django. Also, note, my paginator only works for parent records, I had to implement a separate solution for pagination of many-to-many or one-to-many records. Ping me back if anyone wants to see it, this WIP is fairly old already :) |
@Goldcap If you're interested / have time it would be cool to see that work extracted to make it easier to find. I don't mean to add more work to your plate though. :) |
Hi Ben; Absolutely, will upload probably this weekend. Sorry for the very late On Fri, Oct 3, 2014 at 9:48 AM, Ben Konrath notifications@github.com
"If there is Evolution, why are there monkeys?" - Larry King |
Will be addressed in dustinfarris/ember-django-adapter#22 |
Hi, I have an API response from Django REST Framework v2.4.3 that looks like this, for
/api/puzzles/
I've connected this to my Ember application with DS.DjangoRESTAdapter. When I run
WeatherRoulette.__container__.lookup('store:main').find('puzzle')
, ember-data says it's expecting a different format:I've forgotten how to customize the JSON root for ember-data. I just want to point it to
results
. Is there a simple config change for this? I'm using Ember 1.7.0, ember-data 1.0.0-beta.10.Thanks.
The text was updated successfully, but these errors were encountered: