#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):

 I don't see nothing wrong to use these imports.
 You can not use most of django features before configuring settings.
 If you will try to use some method, which is accessing settings inside
 without configuring settings, you will get the same effect.

 I'm not familiar with `staticfiles` package to say if this stuff with
 `urlpatterns` needed or not, so
 some core dev will give an answer to that.

 `if DEFAULT_CACHE_ALIAS not in settings.CACHES` '''is needed''' because
 code in this module relies on this check and you can not simply remove it
 without giving the alternative.
 Also, It is better to raise error about wrong configuration at the start
 than getting an error when trying to use cache stuff.

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

Reply via email to