#32933: Point users to BoundField.initial instead of
Form.get_initial_for_field()
-------------------------------------+-------------------------------------
Reporter: Chris Jerdonek | Owner: Chris
Type: | Jerdonek
Cleanup/optimization | Status: assigned
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):
#32937 brought up that whilst Form.get_initial_for_field() doesn't cache
its return values, whereas BoundField.initial does.
Discussion there was to...
> ... add a paragraph in
https://docs.djangoproject.com/en/3.2/ref/forms/api/#dynamic-initial-
values saying _Why_ BoundField.initial is preferred: simpler interface,
and caches values, which matters for callables, like now().
That can be resolved as part of this ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/32933#comment:7>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.b22b3b66f610ca9749cf43048ad2d460%40djangoproject.com.