This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |