#28265: Template widget rendering: "Add the renderer argument ..." false
positive
when using **kwargs
----------------------------------------+------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
----------------------------------------+------------------------
I have a custom widget with the following method:
{{{
def render(self, *args, **kwargs):
self.pre_render_setup(*args, **kwargs)
try:
super().render(*args, **kwargs)
finally:
self.post_render_cleanup(*args, **kwargs)
}}}
Starting with Django 1.11 every use of this widget spews the following
warning:
{{{
.../venv/lib64/python3.5/site-packages/django/forms/boundfield.py:41:
RemovedInDjango21Warning: Add the `renderer` argument to the render()
method of <class '...'>. It will be mandatory in Django 2.1.
}}}
As I'm using `**kwargs`, the `renderer` value is correctly passed on to
the `render()` function. This warning should be silenced.
--
Ticket URL: <https://code.djangoproject.com/ticket/28265>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.3946538a94c007c7bf1379e90b9f6045%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.