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:
https://github.com/ubernostrum/django-contact-
form/blob/a30a3de7e80936e47ec939e5275ef00f03342688/src/contact_form/forms.py#L94
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
--
Ticket URL: <https://code.djangoproject.com/ticket/33265>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Mariusz Felisiak):
New features introduce new methods, some of then may collide with existing
3rd-party packages. `Form.get_context()` is
[https://docs.djangoproject.com/en/4.0/ref/forms/api/#get-context
documented] and mentioned in release notes. I'm not sure what else we
could do 🤔 Do you have any suggestion?
--
Ticket URL: <https://code.djangoproject.com/ticket/33265#comment:1>
Comment (by 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.0" or something.
--
Ticket URL: <https://code.djangoproject.com/ticket/33265#comment:2>
* status: new => closed
* resolution: => invalid
Comment:
Replying to [comment:2 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 [https://github.com/ubernostrum/django-contact-form/pull/61 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/33265#comment:3>