Opened 4 years ago
Closed 4 years ago
#33265 closed Bug (invalid)
Form.get_context() backward-incompatibility
| Reported by: | Collin Anderson | Owned by: | nobody |
|---|---|---|---|
| Component: | Forms | 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
Hi All,
The new Form.get_context() method was added in #31026 on Sept 20th, but this breaks any form that already has a different get_context() method, for example:
I'd suggest at least making sure this is documented in the release notes. But also, is there an upgrade-path for 3rd party libraries like django-contact-form that need to support multiple django versions?
Thanks,
Collin
Change History (3)
comment:1 by , 4 years ago
follow-up: 3 comment:2 by , 4 years ago
Right, yeah, maybe there's not too much Django can do about it, but maybe it could also get a quick mention under "Backwards incompatible changes in 4.1" or something.
comment:3 by , 4 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Replying to Collin Anderson:
Right, yeah, maybe there's not too much Django can do about it, but maybe it could also get a quick mention under "Backwards incompatible changes in 4.1" or something.
I don't have an advice that will work in all cases. Probably the best way is to rename an existing method but calling super().get_context() can also be an option, all depends :| I'm going to close it for now due to the lack of good advice.
New features introduce new methods, some of then may collide with existing 3rd-party packages.
Form.get_context()is documented and mentioned in release notes. I'm not sure what else we could do 🤔 Do you have any suggestion?