--
Ticket URL: <https://code.djangoproject.com/ticket/16575>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* easy: 0 => 1
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/16575#comment:1>
* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
* needs_tests: 0 => 1
* needs_docs: 0 => 1
Comment:
Hi, thanks for the contribution! A bit of cleanup and simple extra
features are always welcome.
There are however a couple of issues with the patch:
* Actually, it's not a patch; could you create a diff from the current
trunk?
* Make sure there are no leftover prints or other debug-statements.
* Other date widgets fall back to default date formats (see DateInput for
example) and it is nice to do the same here.
* The cleanup makes the code crisper, but it also makes the helper
functions on top a bit harder to read, could you document them?
* The new features should be documented and check whether there are tests
for the widget, if they still work and whether or not they need updating.
--
Ticket URL: <https://code.djangoproject.com/ticket/16575#comment:2>
Comment (by calebs):
I made foobarrior's changes into a git diff off of the 1.3.1 trunc with a
few other changes including:
* Removal of stray prints and other debug statements.
* Adding _has_changed back in. (Not certain about what to do with this
method)
* Consolidated the two helper functions into one and added a docstring.
* Fallback to defaults based on locale
If L10N is False, the changes in this diff make the select widgets order
by year, month, day. I'm not sure if this should fall back to US order
(d/m/Y) as before, or UTC (Y/m/d).
Tests are still needed and this diff causes a failure in line 92 of
FormsExtraTestCase. However, should the test be amended to use UTC or en-
US in the event of no L10N?
--
Ticket URL: <https://code.djangoproject.com/ticket/16575#comment:3>
* version: 1.3 =>
--
Ticket URL: <https://code.djangoproject.com/ticket/16575#comment:4>
* easy: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/16575#comment:5>
* status: new => closed
* resolution: => duplicate
Comment:
Duplicate of #22684. Use `SelectDateWidget.empty_label` in Django 1.8+.
--
Ticket URL: <https://code.djangoproject.com/ticket/16575#comment:5>