Changes between Initial Version and Version 1 of Ticket #24215
- Timestamp:
- Jan 24, 2015, 9:47:43 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24215 – Description
initial v1 1 1 I dealt with `add_lazy_relation()` a few months ago working on Mezzanine and I thought it could use some detangling. 2 2 3 Now that the list of pending operations is stored in the Appsclass, 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.3 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. 4 4 5 5 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. 6 6 7 Pull request at https://github.com/django/django/pull/3984