Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Wieher mwieher

View GitHub Profile
View gist:9257159
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({
View gist:9236155
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 Jan 22, 2014
Django 1.4, Celery Camera, Integration
View gist:8559971
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
You can’t perform that action at this time.