From 18c7ed74e4fbdde9cb839a4031b8683053d97952 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Thu, 24 Nov 2005 22:41:05 +0000 Subject: Fixed #896 -- Fixed error in filesystem serve view in Windows. Thanks, Petar Marić and nesh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.djangoproject.com/svn/django/trunk@1402 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/views/static.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/views/static.py b/django/views/static.py index 28e43ec612..4ff4313dab 100644 --- a/django/views/static.py +++ b/django/views/static.py @@ -34,7 +34,7 @@ def serve(request, path, document_root=None, show_indexes=False): if part in (os.curdir, os.pardir): # strip '.' amd '..' in path continue - newpath = os.path.join(newpath, part) + newpath = os.path.join(newpath, part).replace('\\', '/') if newpath and path != newpath: return HttpResponseRedirect(newpath) fullpath = os.path.join(document_root, newpath) -- cgit v1.3