backbone-tastypie

A small compatibility layer to make backbone.js and django-tastypie work together happily.

Backbone-tastypie

A small conversion layer to make backbone.js and django-tastypie work together happily.

Usage

Add backbone_tastypie to your INSTALLED_APPS setting, and add the following to your base template: <script type="text/javascript" src="{{ STATIC_URL }}js/backbone-tastypie.js"></script>

How it works

Specifically, it overrides Backbone.sync to do a GET request after creating an object (if there is no response body), and overrides Backbone.Model.prototype.idAttribute, Backbone.Model.prototype.url, Backbone.Model.prototype.parse and Backbone.Collection.prototype.parse.

Backbone.Collection.prototype.url is overridden so it can build urls for a set of models when using the fetchRelated method in Backbone-relational.

Related Repositories

backbone-tastypie

backbone-tastypie

A small compatibility layer to make backbone.js and django-tastypie work together happily. ...

backbone-tastypie

backbone-tastypie

Modifications to Backbone's Model an Collection so that they play nice with django-tastypie. Includes a way to easily paginate over a resource list and a way to access the associated meta information. ...

backbone-tastypie-requirejs

backbone-tastypie-requirejs

Backbone.js + require.js + django-tastypie ...

django-tastypie-backbone-todo-tutorial

django-tastypie-backbone-todo-tutorial

A tutorial / sample app to read todos from an API into a backbone app ...

tastypie-model-method

tastypie-model-method

Call Django model methods via Tastypie and optionally trigger change events in your Backbone code ...


Top Contributors

PaulUithol areski SmileyChris