Opened 15 years ago
Closed 13 years ago
#13196 closed New feature (fixed)
Display datetime.date values using DATE_FORMAT
Reported by: | Beuc | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
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 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Type: | → New feature |
---|
comment:4 by , 14 years ago
Severity: | → Normal |
---|
comment:5 by , 13 years ago
UI/UX: | set |
---|
comment:6 by , 13 years ago
Easy pickings: | unset |
---|---|
Owner: | changed from | to
comment:7 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 905bd7fb44a0dbd0be0d455ab428c388714ae700.
Note:
See TracTickets
for help on using tickets.
Agreed. Rendering date and datetime in ALL templates (not only admin) must be synced with settings.DATE_FORMAT and settings.DATE_TIME_FORMAT accordingly.