Repository navigation
Show seconds for datetime fields in the admin - #526
Open
GiannopoulosK wants to merge 1 commit into
Open
GiannopoulosK wants to merge 1 commit into
GiannopoulosK wants to merge 1 commit into
Conversation
Display the created, started and completed datetimes as Y-m-d H:i:s in the task and group result admins. Columns keep their labels and still sort by the underlying field. Closes celery#403
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #403
Django's default datetime format drops the seconds, which makes tasks that ran close together hard to tell apart. This shows the date fields as
Y-m-d H:i:s(in the active timezone) in the task and group result admins, both in the list views and on the detail pages.date_hierarchyandlist_filterare unchanged.TaskResultAdmin.readonly_fields, so subclasses whose fieldsets still name them keep working withALLOW_EDITS.DATETIME_DISPLAY_FORMAT) if a different one is preferred.Tests cover the formatting, timezone handling, sorting, both admins' list/detail pages, and the subclass case.