Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #16447 -- Stopped using the setting name as the sender paramete…

…r for the setting_changed signal. Thanks, Alex Gaynor.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 723b5747933f8519708a1b75e1c01478151dec33 1 parent 54b9c03
Jannis Leidel authored July 10, 2011
2  django/test/utils.py
@@ -177,7 +177,7 @@ class OverrideSettingsHolder(UserSettingsHolder):
177 177
     """
178 178
     def __setattr__(self, name, value):
179 179
         UserSettingsHolder.__setattr__(self, name, value)
180  
-        setting_changed.send(sender=name, setting=name, value=value)
  180
+        setting_changed.send(sender=self.__class__, setting=name, value=value)
181 181
 
182 182
 
183 183
 class override_settings(object):
2  docs/ref/signals.txt
@@ -487,7 +487,7 @@ Sent when some :ref:`settings are overridden <overriding-setting>` with the
487 487
 Arguments sent with this signal:
488 488
 
489 489
 ``sender``
490  
-    The setting name (string).
  490
+    The settings handler.
491 491
 
492 492
 ``setting``
493 493
     Same as sender
7  tests/regressiontests/settings_tests/tests.py
@@ -24,10 +24,11 @@ def __init__(self):
24 24
 testvalue = None
25 25
 
26 26
 def signal_callback(sender, setting, value, **kwargs):
27  
-    global testvalue
28  
-    testvalue = value
  27
+    if setting == 'TEST':
  28
+        global testvalue
  29
+        testvalue = value
29 30
 
30  
-signals.setting_changed.connect(signal_callback, sender='TEST')
  31
+signals.setting_changed.connect(signal_callback)
31 32
 
32 33
 class SettingsTests(TestCase):
33 34
 

0 notes on commit 723b574

Please sign in to comment.
Something went wrong with that request. Please try again.