Opened 13 years ago

Closed 12 years ago

#1315 closed defect (worksforme)

image / file field in admin have empty links

Reported by: debert@… Owned by: Adrian Holovaty
Component: contrib.admin Version: master
Severity: minor Keywords: FileField admin link
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


when I upload images through FileFields or ImageFields, they show up on the model's update page in the admin fine, but their link's href is empty.

this has been discussed [here] .
the (?expected) behaviour would be to just link to the uploaded file, right?
if I may suggest on a new widow (target='_blank') would be nice.

Change History (3)

comment:1 Changed 13 years ago by Gabor Farkas <gabor@…>

it seems that it works in the magic-removal branch, so maybe it makes no sense to fix it in the "normal" branch

comment:2 Changed 13 years ago by jlabath@…

Here is a workaround, for those that cannot use magic-removal branch.

You can overwrite the template that is responsible for the file widget.

  1. in your templates directory create widget directory.
  2. copy trunk/django/contrib/admin/templates/widget/file.html to the widget folder you created.
  3. edit as needed.

comment:3 Changed 12 years ago by Chris Beaven

Resolution: worksforme
Status: newclosed

Considering Gabor's comment, this doesn't seem to be an issue now.

Note: See TracTickets for help on using tickets.
Back to Top