Code

Ticket #7156: model_getfilename_win.diff

File model_getfilename_win.diff, 516 bytes (added by fcaprioli@…, 6 years ago)
Line 
1Index: base.py
2===================================================================
3--- base.py     (revision 7511)
4+++ base.py     (working copy)
5@@ -433,7 +433,7 @@
6 
7     def _get_FIELD_filename(self, field):
8         if getattr(self, field.attname): # value is not blank
9-            return os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname))
10+            return os.path.normpath(os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname)))
11         return ''
12 
13     def _get_FIELD_url(self, field):