I'm getting the error with the following code:
App.SearchRoute = Ember.Route.extend({
model: function(){
return this.store.find('cabinets')
}
});
App.SearchAdapter = DS.DjangoRESTAdapter.extend({
namespace: 'rest_framework'
});
I created the model but its not formatting the JSON correctly and I'm not sure what I am doing wrong.
Also if I pump in this code instead:
App.Store = DS.DjangoRESTStore.extend({
adapter: DS.DjangoRESTAdapter.create({
namespace: "rest_framework"
}),
revision: 12
});
I get an error on the extend method....
Here is my JSON return from a test.
0: {id:1, cabinet_name:HR Department, cabinet_security:1, status:1}
Here is what chrome shows me
Oh yes there is quotes around I didnt notice that those didnt copy over from the debugger.
Here is what I have listed and now for some reason it works
What version of Ember Data are you using? If it's a 1.0, you need to use the version described here (https://github.com/emberjs/data/blob/master/TRANSITION.md) and not define the store like so. I'm pretty sure you were originally trying that though. Additionally, is your JSON really not coming with quotes around HR Department?