Changes between Initial Version and Version 1 of Ticket #24215


Ignore:
Timestamp:
01/24/15 15:47:43 (7 years ago)
Author:
Alex Hill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24215 – Description

    initial v1  
    11I dealt with `add_lazy_relation()` a few months ago working on Mezzanine and I thought it could use some detangling.
    22
    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.
     3Now 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.
    44
    55I'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.
    66
     7Pull request at https://github.com/django/django/pull/3984
Back to Top