Hello everyone,
I was wondering if it would be possible to extend the admin date_hierarchy logic to also accept a list of field names instead of just a single field name.
This would be useful for models that have multiple date fields that could be equally important to filter by (such as invoices, which typically have 4 associated dates).
By modifying the change_list admin template and the date_hierarchy admin template tag a little (see attachments) I was able to make it accept and use a list of strings. I unfortunately couldn't figure out how to make it also work with a single string, which would be important for not breaking existing configurations. It is aslo worth mentioning that I had to use --skip-checks for testing purposes, so the admin checks would also need to be adjusted accordingly.
Any thoughts on this?
Regards,
Adam