Opened 5 years ago

Closed 3 years ago

#13196 closed New feature (fixed)

Display datetime.date values using DATE_FORMAT

Reported by: Beuc Owned by: aaugustin
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

The list view in django.contrib.admin uses settings.DATE_FORMAT for DateField's.

However it doesn't for datetime.date results (e.g. when a custom Model function returns a date): it uses the YYYY-MM-DD format (aka __str__()).

I think it would make sense to display Python dates in the admin interface using the l10n settings.

(same question for datetime/DATETIME_FORMAT)

What do you think?

Change History (7)

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by Valera_Grishin

Agreed. Rendering date and datetime in ALL templates (not only admin) must be synced with settings.DATE_FORMAT and settings.DATE_TIME_FORMAT accordingly.

comment:3 Changed 4 years ago by lukeplant

  • Type set to New feature

comment:4 Changed 4 years ago by lukeplant

  • Severity set to Normal

comment:5 Changed 4 years ago by julien

  • UI/UX set

comment:6 Changed 3 years ago by aaugustin

  • Easy pickings unset
  • Owner changed from nobody to aaugustin

comment:7 Changed 3 years ago by aaugustin

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top