#30536: Allow running custom logic in django.setup().
--------------------------------+------------------------------------
     Reporter:  pascal chambon  |                    Owner:  nobody
         Type:  New feature     |                   Status:  new
    Component:  Core (Other)    |                  Version:  master
     Severity:  Normal          |               Resolution:
     Keywords:  setup           |             Triage Stage:  Accepted
    Has patch:  1               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  1
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+------------------------------------
Changes (by Carlton Gibson):

 * stage:  Unreviewed => Accepted


Comment:

 OK, I'm going to provisionally accept this.

 Two use-cases seem desirable:

 1. The testing example, of setting up mocks etc.
 2. If #28752 were in place, having a ''project-level'' hook for Do-this-
 Once setup logic might solve issues that app-level `ready()` handlers
 can't.

 I'm not sure about the proposed implementation. I'll ask others to review.
 (Maybe we have to say `wontfix`, and stick with monkey patching `setup()`
 if needs be...)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30536#comment:4>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.846e6118199698a01fe013ea56267015%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to