#24347: parameter 'widget' of BoundField.as_widget is ignored
----------------------------+-----------------------------------
Reporter: srkunze | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords: BoundField, as_widget
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 1
----------------------------+-----------------------------------
'as_widget' has the parameter 'widget' which renders the field. However,
this parameter is not used all the time during the 'as_widget' call.
The method 'data', which is called by 'as_widget' ALWAYS used the default
widget of the field which leads to issues.
We recognized this issue when using 'show_hidden_initial=True' and widgets
for datetime objects.
The problem can also be observed when using BoundField.as_hidden as it
uses 'as_widget' as well.
cf.
as_widget:
https://github.com/django/django/blob/master/django/forms/forms.py#L526
data:
https://github.com/django/django/blob/master/django/forms/forms.py#L569
as_hidden:
https://github.com/django/django/blob/master/django/forms/forms.py#L562
--
Ticket URL: <https://code.djangoproject.com/ticket/24347>
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/050.ad628a6ce29127f72630c681afc7e495%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.