#25034: Remove attempts to access settings at import time
-------------------------------------+-------------------------------------
     Reporter:  evansd               |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Uncategorized        |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by coldmind):

 That is what I'm saying, you're trying to import a module without
 configuring settings before.
 When django application will be runned, it can safely import this, because
 `django.setup()` must be called when configuring wsgi-application.
 I don't see use case when you need to import this django stuff outside of
 configured django environment.

 Also, you can not simply remove thinks you removed in you pull request,
 because these imports are needed.
 Second case is used:
 http://djangoci.com/view/coverage/job/django-coverage/HTML_Coverage_Report
 /_mnt_jenkinsdata_workspace_django-
 coverage_django_contrib_staticfiles_urls.html#n17
 The first one is not covered by tests, but I believe it can not be simply
 tested or simply test is missing.

 I lean to close this ticket as invalid, but lets wait for core dev
 decision.

--
Ticket URL: <https://code.djangoproject.com/ticket/25034#comment:6>
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/064.09b5e62414af0623675c19a44c88662b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to