#32937: Form.get_initial_for_field() can return different values if called more
than once
--------------------------------+--------------------------------------
     Reporter:  Chris Jerdonek  |                    Owner:  nobody
         Type:  Uncategorized   |                   Status:  new
    Component:  Forms           |                  Version:  dev
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------

Comment (by Carlton Gibson):

 Hey Chris.

 Given #32933 — pointing users to `BoundField.initial`, would you object to
 just documenting this?

 We could 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()`.

 What do you think? I'm not sure we get much benefit adding yet more code
 to this one… 🤔

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32937#comment:1>
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.d0b562c911218a22c7894bda4f19d5c0%40djangoproject.com.

Reply via email to