Opened 9 years ago

Closed 8 years ago

#1315 closed defect (worksforme)

image / file field in admin have empty links

Reported by: debert@… Owned by: adrian
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: UI/UX:

Description

hi.
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] http://groups.google.com/group/django-users/browse_frm/thread/c385c0b9c2a36067/5b6af6101cb1733b?q=ImageField+admin&rnum=1#5b6af6101cb1733b .
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 9 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 9 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 8 years ago by SmileyChris

  • Resolution set to worksforme
  • Status changed from new to closed

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

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