Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#22507 closed Cleanup/optimization (fixed)

Sending signal documentation is misleading

Reported by: Claude Paroz Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the documentation of sending signals (https://docs.djangoproject.com/en/dev/topics/signals/#sending-signals), there is an example where the sender parameter is filled with self (an instance), while most of the time, sender should be a class (at least it's the case in Django's own source code).

Unless I'm misunderstanding something, I suggest to replace sender=self by sender=self.__class__ in the example. And maybe specify that sender is a class most of the time. I can do the change if someone confirms that issue.

Change History (3)

comment:1 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

In d1f93e9c1e2c61bb06a6f99c80bd9437c5081f2d:

Fixed #22507 -- Clarified nature of the sender argument of signals

comment:2 by Claude Paroz <claude@…>, 11 years ago

In abd68b5affaec35e941b49f1b0a4cb8d70c22d7b:

[1.7.x] Fixed #22507 -- Clarified nature of the sender argument of signals

Backport of d1f93e9c1e from master.

comment:3 by Claude Paroz <claude@…>, 11 years ago

In b4b63b3832896d00bd9bd9e15c00cb7f1f9ac3ad:

[1.6.x] Fixed #22507 -- Clarified nature of the sender argument of signals

Backport of d1f93e9c1e from master.

Note: See TracTickets for help on using tickets.
Back to Top