Admin date_hierarchy drill-down should auto-initialise to appropriate level
|Reported by:||Simon Meers||Owned by:||Simon Meers|
|Severity:||Keywords:||admin, date_hierarchy, sprintdec2010|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Say you have a model with a
date_hierarchy field selected in the
ModelAdmin, but the dates so far only span a few days. Instead of seeing the year displayed, then clicking it to show the month, then clicking it to show the days, perhaps it would be a good idea to initialise it based on the span of dates to show the first level with multiple options. That is, if all the dates are in one month, show the day-level drill-down initially. If two months are spanned, but in the same year, show the month-level drill down initially. If multiple years are indeed spanned, then start with the year-level interface.
Similarly to how
list_filters intelligently show/hide themselves based on available data.
Happy to code this, just wanted to get my thoughts down first.
Change History (12)
comment:4 Changed 6 years ago by
|Patch needs improvement:||unset|