Why are you using weakref? This seems to be the only place you actually dereference the models. We shouldn't prematurely worry about poor garbage collection as a result of cyclical references, as it adds a layer of indirection and error checking every time it is to be used.