id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 24215,Refactor of lazy model operations,Alex Hill,nobody,"I dealt with `add_lazy_relation()` a few months ago working on Mezzanine and I thought it could use some detangling. Now that the list of pending operations is stored in the `Apps` class, it makes sense to put the related methods on that class as well. Running a function when a model is loaded seems an appropriate job for the app registry object. I've introduced a more generic API, whereby a user-supplied function can be called once any number of models are ready, with those freshly-loaded models as its arguments (plus optional kwargs), a helper function for related models, and the old `add_lazy_relation()` reimplemented in terms of the new API with a deprecation warning. New pull request, now targeting master rather than 1.8, at https://github.com/django/django/pull/4130",Cleanup/optimization,closed,"Database layer (models, ORM)",dev,Normal,fixed,,cmawebsite@…,Accepted,1,0,0,0,0,0