1
0
mirror of https://github.com/django/django.git synced 2024-12-26 11:06:07 +00:00

Fixed #413 -- get_file_url() for FileFields now uses proper slashes on Windows. Thanks, Adam Endicott

git-svn-id: http://code.djangoproject.com/svn/django/trunk@579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-08-31 16:22:07 +00:00
parent 5569c75eb6
commit abe7fb8173

View File

@ -996,7 +996,7 @@ def method_get_file_filename(field, self):
def method_get_file_url(field, self):
if getattr(self, field.name): # value is not blank
import urlparse
return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name))
return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name)).replace('\\', '/')
return ''
def method_get_file_size(field, self):