Skip to content

Commit

Permalink
Fixed #413 -- get_file_url() for FileFields now uses proper slashes o…
Browse files Browse the repository at this point in the history
…n Windows. Thanks, Adam Endicott

git-svn-id: http://code.djangoproject.com/svn/django/trunk@579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Aug 31, 2005
1 parent 5569c75 commit abe7fb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/core/meta/__init__.py
Expand Up @@ -996,7 +996,7 @@ def method_get_file_filename(field, self):
def method_get_file_url(field, self): def method_get_file_url(field, self):
if getattr(self, field.name): # value is not blank if getattr(self, field.name): # value is not blank
import urlparse import urlparse
return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name)) return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name)).replace('\\', '/')
return '' return ''


def method_get_file_size(field, self): def method_get_file_size(field, self):
Expand Down

0 comments on commit abe7fb8

Please sign in to comment.