django-filer
django-filer copied to clipboard
Display name of filer on admin change view should match list view
Currently in the admin change view for files, it is hard-coded to always display the original_filename
.
This can be very confusing for editors who are often required to replace an outdated PDF, etc. If the displayed name is 'Cool brochure 2014.pdf' but the current file is the 'Cool brochure 2016.pdf' then they get very confused and think the old file is still in filer.
The admin list view uses the __str__
method to determine what to display, so the change view should match this.
Pull request on its way.
#931 only fixes the hard-coded name in the template. However, why does filer only track the original filename and use that as the default display name? What's the point of the original_filename field other than this? Shouldn't it instead just track the current filename and default to that unless they've manually specified a name?
@yakky should __str__
continue to default to the original_filename or should we track the current filename instead?
@stefanfoulis @jsma it's maybe actually confusing keeping original_filename
unchanged after uploading a new file
@jsma I'd merge your current PR in 1.2.6 and let's figure out an optimal solution for this issue
Should we discuss on the mailing list or what are next steps?
The idea of original_filename
was to have a reference to the originally uploaded filename and to have something to display whenever user do not provide a custom name. It is a separate field to be able to distinguish whether a user provided a custom name or left it unchanged. But that behaviour seems to currently be broken. If we keep original_filename
around, we should update it whenever a new version of the file is uploaded and make sure it is used consistently (if a user provides a custom name
, that should be displayed). Makes ordering harder though.
As @yakky wrote, it is debatable if keeping original_filename
makes sense at all.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This will now be closed due to inactivity, but feel free to reopen it.