From abe7fb8173326567463d21257db73647d4a7b365 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 31 Aug 2005 16:22:07 +0000 Subject: [PATCH] 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 --- django/core/meta/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/meta/__init__.py b/django/core/meta/__init__.py index 02e264607b..cd0f306320 100644 --- a/django/core/meta/__init__.py +++ b/django/core/meta/__init__.py @@ -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):