Opened 4 years ago

Closed 4 years ago

#30768 closed Bug (invalid)

django.forms.boundfield.as_widget() causes an exception when used.

Reported by: Mark Owned by: nobody
Component: Forms Version: 2.2
Severity: Normal Keywords: boundfiled renderer
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Mark)

/django/forms/;90-95 calls widget.render() with 'rederer=self.form.renderer' on line 94

the renderer argument was removed in 2.1; <>

This should be very easy to fix; it looks like this method wasn't updated when the renderer argument was removed.

I commented out line 94 locally and it fixes the problem.

I just installed 2.2.5 to verify that this still existed, I also did a search of existing tickets, but couldn't find this reported yet.

edit: I just rechecked the patch submission guidlines, and I made the patch wrong, its just the output of 'diff'; its simply deleting line 94

Attachments (1) (49 bytes) - added by Mark 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by Mark

Attachment: added

comment:1 Changed 4 years ago by Mark

Description: modified (diff)

comment:2 Changed 4 years ago by Mariusz Felisiak

Resolution: invalid
Status: newclosed
Summary: django.forms.boundfield.as_widget method hasn't been updated, and causes an exception when used!django.forms.boundfield.as_widget() causes an exception when used.

renderer argument wasn't removed in Django 2.1, we only removed only support for Widget.render() methods without this argument. I don't see any issue in this code.

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