--
Ticket URL: <https://code.djangoproject.com/ticket/34431>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Claude Paroz (added)
* type: Uncategorized => Cleanup/optimization
* component: Uncategorized => Documentation
* stage: Unreviewed => Accepted
Comment:
Thanks for the report. We should update the docs.
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:1>
* owner: nobody => edisonwang03
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:2>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:3>
* cc: Edison Wang (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:4>
* has_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:5>
* has_patch: 0 => 1
Comment:
Link to pull request: [https://github.com/django/django/pull/16698]
I also updated the documentation for TimeField and DateField because the
{{{input_formats}}} attribute for both fields are also generators since
they are lazily evaluated.
I believe that the changes made to
{{{django.forms.fields.DateTimeField.input_formats}}} from
[https://github.com/django/django/commit/188b003014dc727ca22f7fafb21cf2fa0b3472d2]
are redundant. The previous initialization is already lazily evaluated, so
there is no need to include the class {{{DateTimeFormatsIterator}}} to
define the generator. Should this part be reverted?
* needs_better_patch: 0 => 1
Comment:
> I believe that the changes made to
{{{django.forms.fields.DateTimeField.input_formats}}} from
[https://github.com/django/django/commit/188b003014dc727ca22f7fafb21cf2fa0b3472d2]
are redundant. The previous initialization is already lazily evaluated, so
there is no need to include the class {{{DateTimeFormatsIterator}}} to
define the generator. Should this part be reverted?
`get_format_lazy()` doesn't support multiple settings so
`DateTimeFormatsIterator` is necessary.
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:6>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"cbcc1240e912cfc47cb6ea0c4fe6b4a48f36f7e2" cbcc1240]:
{{{
#!CommitTicketReference repository=""
revision="cbcc1240e912cfc47cb6ea0c4fe6b4a48f36f7e2"
Fixed #34431 -- Improved Date/DateTimeField/TimeField.input_formats docs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:8>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"9ef2625cd51f6f84d6268322b1f8e59b99b35aac" 9ef2625c]:
{{{
#!CommitTicketReference repository=""
revision="9ef2625cd51f6f84d6268322b1f8e59b99b35aac"
[4.2.x] Fixed #34431 -- Improved
Date/DateTimeField/TimeField.input_formats docs.
Backport of cbcc1240e912cfc47cb6ea0c4fe6b4a48f36f7e2 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34431#comment:9>