Opened 16 years ago

Last modified 13 years ago

#7415 closed

FileFields have wrong url in admin under Windows, when using upload_to path — at Initial Version

Reported by: edgars.jekabsons@… Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords: windows filefield fs-rf-fixed
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Right now (revision 7612) AdminFileWidget is implemented this way:

if value:

output.append('%s <a target="_blank" href="%s%s">%s</a> <br />%s ' % \

(_('Currently:'), settings.MEDIA_URL, value, value, _('Change:')))

The value in database contains \ as a path separator. It is shown as a url instead of needed / separator for urls. Works as is under Unix, but clearly not on Windows.

Model get_<field>_url() method gives the url with correct path separator. Perhaps it should be used in the link instead of value.

Change History (0)

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