Commit 432de546 authored by Claude Paroz's avatar Claude Paroz
Browse files

[1.6.x] Fixed #21486 -- Prevented settings config in signal connection

This was particularly problematic in the chain get_wsgi_application
-> db.connections import -> signal connection -> settings configuration.
Thanks Jon Dufresne for the report.
Backport of 42fef294 from master.
parent 87502969
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ class Signal(object):
        from django.conf import settings

        # If DEBUG is on, check that we got a good receiver
        if settings.DEBUG:
        if settings.configured and settings.DEBUG:
            import inspect
            assert callable(receiver), "Signal receivers must be callable."

+2 −0
Original line number Diff line number Diff line
@@ -35,3 +35,5 @@ Bug fixes
  promised: Support of multiple locale names separated by commas. It's still
  possible to specify multiplle locales in one run by suing the option
  multiple times (#21488, #17181).
* Fixed a regression that unnecessarily triggered settings configuration when
  importing ``get_wsgi_application`` (#21486).