Skip to content

Instantly share code, notes, and snippets.

View mwieher's full-sized avatar

Michael W mwieher

View GitHub Profile
App.House = DS.Model.extend({
doors: DS.hasMany('door');
});
App.Door = DS.Model.extend({
index: DS.attr(); //this doors position in the list of Many doors
house: DS.belongsTo('house');
});
App.DoorController = Ember.ObjectController.extend({
@mwieher
mwieher / gist:9236155
Created February 26, 2014 19:03
EmberJS Issues
App.House = DS.Model.extend({
address = DS.attr('string');
doors = DS.hasMany('door');
});
App.Door = DS.Model.extend({
wood = DS.attr('string');
});
App.Router.map(function () {
@mwieher
mwieher / gist:8559971
Created January 22, 2014 14:48
Django 1.4, Celery Camera, Integration
from djcelery.snapshot import Camera
from django.db import transaction
class CustomCam(Camera):
def on_shutter(self, state, commit_every=100):
if not state.event_count:
if transaction.is_managed():
transaction.commit()
return