Opened 4 years ago

Closed 4 years ago

#16272 closed Cleanup/optimization (fixed)

Date-related widgets still have format attribute set on class

Reported by: bpeschier Owned by: nobody
Component: Forms Version: master
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 aaugustin 4 years ago.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by aaugustin

comment:1 Changed 4 years ago by aaugustin

  • Has patch set
  • Needs documentation set
  • Needs tests unset
  • 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 Changed 4 years ago by aaugustin

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 4 years ago by bpeschier

  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

Patch does not break anything here as well.

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

comment:4 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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