Django + Tastypie + Backbone.js = TastyBackbonePie
jQuery plugin to create ajax data tables using a django-tastypie api backend. Includes a way to easily paginate, sort and filter tables too.

https://github.com/sspross/tastybackbonepie
var book_table_settings = {
uid: 'book_table',
root_url: '/api/v1/book/',
fields: [
{
'key': 'id',
'label': '#',
},
{
'key': 'name',
'label': 'Name',
'order_by': 'name',
},
{
'key': 'added',
'label': 'Added at',
'order_by': 'added',
},
{
'key': 'read',
'label': 'Read',
'template': '<% if (entry.get(\'read\') == true) { %>x<% } %>',
'order_by': 'read',
},
],
additional_html_fields: [
'<a class="btn btn-mini" href="#" data-id="<%= entry.get(\'id\') %>"><i class="icon-trash"></i></a>',
]
};
var book_table = $('#book-table').renderTastyBackbonePieTable(book_table_settings);Written by Silvan Spross
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Filed Under
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#