Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #413 -- get_file_url() for FileFields now uses proper slashes o…

…n Windows. Thanks, Adam Endicott

git-svn-id: http://code.djangoproject.com/svn/django/trunk@579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit abe7fb8173326567463d21257db73647d4a7b365 1 parent 5569c75
Adrian Holovaty authored August 31, 2005

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/core/meta/__init__.py
2  django/core/meta/__init__.py
@@ -996,7 +996,7 @@ def method_get_file_filename(field, self):
996 996
 def method_get_file_url(field, self):
997 997
     if getattr(self, field.name): # value is not blank
998 998
         import urlparse
999  
-        return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name))
  999
+        return urlparse.urljoin(settings.MEDIA_URL, getattr(self, field.name)).replace('\\', '/')
1000 1000
     return ''
1001 1001
 
1002 1002
 def method_get_file_size(field, self):

0 notes on commit abe7fb8

Please sign in to comment.
Something went wrong with that request. Please try again.