django icon indicating copy to clipboard operation
django copied to clipboard

Refs #33166 -- Added field to context when rendering widget.

Open jrief opened this issue 2 years ago • 1 comments

jrief avatar Oct 07 '21 23:10 jrief

This pull request to fix ticket #14955 is far less intrusive than the previous version.

It now is ready for review.

jrief avatar Nov 03 '21 19:11 jrief

I think #16574 is the right step towards resolving this this. IF we decide that's the right way to go. It introduces the concept of a boundwidget. A boundwiget being "a widget plus data" it should therefore know everything about itself, including which form it belongs to.

It's not there yet, but a further step would move the render/get context to that class instead of the widget itself. get_contex() would then be able to access all that info and avoid passing it into the render method.

https://github.com/django/django/blob/51c9bb7cd16081133af4f0ab6d06572660309730/django/forms/widgets.py#L259

smithdc1 avatar Feb 23 '23 08:02 smithdc1

@jrief What do you think about #16574? See comment.

felixxm avatar Feb 23 '23 12:02 felixxm

Thanks for your email. It has been received and is being attended to by our team.

On Thu, Feb 23, 2023 at 7:02 AM Mariusz Felisiak @.***> wrote:

@jrief https://github.com/jrief What do you think about #16574 https://github.com/django/django/pull/16574? See comment https://github.com/django/django/pull/14955#issuecomment-1441349978.

— Reply to this email directly, view it on GitHub https://github.com/django/django/pull/14955#issuecomment-1441642091, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6RARUIMBNU6NHTAX4ED5TWY5GWHANCNFSM5FSMBDEQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

alewish2196 avatar Feb 23 '23 12:02 alewish2196

Closing per ticket.

felixxm avatar Nov 17 '23 19:11 felixxm