Skip to content

Commit 5d6a54b

Browse files
authored
Fix signal handler doc (#250)
If DEBUG is on and kwags is missing Django will raise the error: `ValueError: Signal receivers must accept keyword arguments (**kwargs).` See https://github.com/django/django/blob/b1b26b37aff0c80d6abdf15c5ffdf0440a9a1d6a/django/dispatch/dispatcher.py#L87 Also parameters are called old_value and new_value.
1 parent fad247c commit 5d6a54b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/react_to_updates.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ below.
2828
2929
# yourapp/util.py
3030
31-
def notify_on_preference_update(sender, section, name, old, new):
31+
def notify_on_preference_update(sender, section, name, old_value, new_value, **kwargs):
3232
print("Preference {} in section {} changed from {} to {}".format(
3333
name, section, old, new))
3434

0 commit comments

Comments
 (0)