#34241: Django admin not showing seconds for list_display nor readonly
DateTimeField
-----------------------------------------+------------------------
Reporter: Petr DlouhĂ˝ | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: 4.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-----------------------------------------+------------------------
The default output format for DateTimeField (e.g. `created`) fields in
Django admin is something like `Jan. 4, 2023, 4:22 p.m.`. When I am
debugging some issue and trying to find matching record in logs I am
lacking information about second (or even milliseconds).
The only solutions I found is either to change `DATETIME_FORMAT`
systemwise:
{{{
from django.conf.locale.en import formats as en_formats
en_formats.DATETIME_FORMAT = "d M. Y H:i:s"
}}}
or to change the output for individual fields.
But I would like to see seconds for all DateTime fields in whole admin
interface and not to change the format in frontend nor API (which the
first solution causes).
Most importantly I feel, that all Django users would benefit from ability
to access whole information about DateTime which is stored in the
database. So my suggestion is to start outputting DateTime fields in admin
interface with tooltip containing whole precise time such as:
{{{
<div class="readonly" title="Jan. 4, 2023, 4:22:30.123 p.m.">Jan. 4, 2023,
4:22 p.m.</div>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34241>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701858134ee8d-010a2698-29a2-49b6-ba7a-5b49e295217a-000000%40eu-central-1.amazonses.com.