Opened 13 years ago

Closed 13 years ago

#16272 closed Cleanup/optimization (fixed)

Date-related widgets still have format attribute set on class

Reported by: Bas Peschier Owned by: nobody
Component: Forms Version: dev
Severity: Normal Keywords: widgets
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

For example: https://code.djangoproject.com/browser/django/trunk/django/forms/widgets.py?rev=16363#L374

These definitions on the class seem to be superseded by settings-based formats (formats.get_format), they can probably be removed.

Attachments (1)

16272.patch (1.2 KB ) - added by Aymeric Augustin 13 years ago.

Download all attachments as: .zip

Change History (5)

by Aymeric Augustin, 13 years ago

Attachment: 16272.patch added

comment:1 by Aymeric Augustin, 13 years ago

Has patch: set
Needs documentation: set
Patch needs improvement: set

The patch I just attached doesn't break anything in the test suite.

The documentation in docs/ref/forms/widgets.txt should be updated to reflect the fact that the default value is now taken from the formats for the current locale when USE_L10N is True.

comment:2 by Aymeric Augustin, 13 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Bas Peschier, 13 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Patch does not break anything here as well.

Documentation issue is handled by #16264, which has a patch.

comment:4 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed

In [16459]:

Fixed #16272 -- Removed stale format class attributes of date-related widgets. Thanks, aaugustin.

Note: See TracTickets for help on using tickets.
Back to Top