Comments (3)
Hi,
It's all pretty open-ended, as you mentioned Backbone is very permissive in how you set up your models. Djangbone doesn't need your backbone models to look a certain way either. So you could do something as simple as the following:
var Widget = Backbone.Model.extend({})
var WidgetCollection = Backbone.Collection.extend{ model: Widget, url: '/your/djangbone/endpoint' }
var c = new WidgetCollection();
c.fetch();
and as long as you have a properly configured BackboneAPIView set up at that endpoint your data should be loaded into the collection.
from djangbone.
I ended up basing my code on
http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-part-1-getting-started/,
which does a good job of showing basic Backbone usage.
Thanks for this great little library, it was just what I needed - we're now
fully ported off Django Admin thanks to it.
On Sat, Sep 1, 2012 at 8:21 AM, Aaron Franks [email protected]:
Hi,
It's all pretty open-ended, as you mentioned Backbone is very permissive
in how you set up your models. Djangbone doesn't need your backbone models
to look a certain way either. So you could do something as simple as the
following:var Widget = Backbone.Model.extend({})
var WidgetCollection = Backbone.Collection.extend{ model: Widget, url:
'/your/djangbone/endpoint' }
var c = new WidgetCollection();
c.fetch();and as long as you have a properly configured BackboneAPIView set up at
that endpoint your data should be loaded into the collection.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-8213804.
from djangbone.
Cool, thanks for your feedback! Glad you like it. I just saw your tweet from last week tooβ was wondering where all those github watchers came from :^)
from djangbone.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djangbone.