#24215: Refactor of lazy model operations
-------------------------------------+-------------------------------------
     Reporter:  AlexHill             |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by AlexHill):

 PR now in much better shape thanks to review from Collin, Anssi, Simon and
 Carl. Notably:
 * I'm no longer using the `class_prepared` signal. Instead,
 `Apps.do_pending_lookups` is called directly at the end of
 `Apps.register_model`.
 * `Apps.lazy_model_operation` no longer accepts keyword arguments.
 Functions passed to it should expect a number of models as positional
 arguments, and nothing else.
 * The `lazy_related_operation` convenience wrapper still supports keyword
 arguments, but they're applied to the supplied function with `partial`
 before it's passed to `Apps.lazy_model_operation`.

--
Ticket URL: <https://code.djangoproject.com/ticket/24215#comment:18>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d49037a6078c8996ccc2ebf5cc9872de%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to