#24347: parameter 'widget' of BoundField.as_widget is ignored
-------------------------------------+-------------------------------------
Reporter: srkunze | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.8beta1
Severity: Normal | Resolution:
Keywords: BoundField, | Triage Stage:
as_widget | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by timgraham):
I think datetimes maybe complicating the issue. It seems like at least one
of the issues is that for the following form:
{{{
class MyForm(forms.Form):
foo = forms.IntegerField(initial=1, show_hidden_initial=True)
form = MyForm({'foo': 5})
}}}
You expect the hidden input to be rendered with "1" instead of "5".
{{{
<label for="id_foo">Foo:</label>
<input id="id_foo" type="number" value="5" name="foo">
<input id="initial-id_foo" type="hidden" value="5" name="initial-foo">
}}}
Is that correct?
By the way, I tried looking at your tests, but they didn't pass even when
I uncommented "# uncomment to see changes with correctly formatted hidden-
initial" -- not sure if that was intended or not?
--
Ticket URL: <https://code.djangoproject.com/ticket/24347#comment:18>
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/065.3fb239f33a111ba6870bb4e929673a48%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.