Git Product home page Git Product logo

Comments (3)

af avatar af commented on August 17, 2024

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.

pamelafox-coursera avatar pamelafox-coursera commented on August 17, 2024

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.

af avatar af commented on August 17, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.