Opened 19 years ago

Closed 18 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: dev
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

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 by Gabor Farkas <gabor@…>, 19 years ago

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 by jlabath@…, 19 years ago

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 by Chris Beaven, 18 years ago

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