#14497: ModelAdmin.readonly_fields isn't graceful with filefields. --------------------------------------------------+------------------------- Reporter: Keryn Knight <ke...@kerynknight.com> | Owner: nobody Status: new | Milestone: Component: Contrib apps | Version: 1.2 Keywords: feature admin readonly filefield | Stage: Unreviewed Has_patch: 0 | --------------------------------------------------+------------------------- Currently, if supplying a !FileField (and presumably, an !ImageField or anything subclassing !FileField) in the list of readonly_fields on a !ModelAdmin instance, the value stored against the database (the path to its location on the filesystem or storage backend) is displayed as plain text.
It would be neater if instead, it displayed an HTML link of path, as it does when displaying the standard file upload widget in a non-readonly context (though excepting the file upload field itself). This would allow for more intuitive handling of admin access to read-only forms with additional data (eg: downloading uploaded PDFs, which is the use-case I'm facing at the moment.) Looking at the source, I think the place to tackle this would be [http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/helpers.py#L162 AdminReadonlyField.contents()] in source:django/trunk/django/contrib/admin/helpers.py but that is just a cursory glance. Obviously, ''low priority'' '''feature request''', rather than a bug. -- Ticket URL: <http://code.djangoproject.com/ticket/14497> Django <http://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 post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.