Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A small compatibility layer to make backbone.js and django-tastypie work together happily.
branch: master

This branch is 43 commits behind PaulUithol:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
backbone_tastypie
test
.gitignore
MANIFEST.in
README.md
setup.py

README.md

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.

Something went wrong with that request. Please try again.