#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.
Note:
See TracTickets
for help on using tickets.
In d1f93e9c1e2c61bb06a6f99c80bd9437c5081f2d: