diff --git a/django/db/models/base.py b/django/db/models/base.py index 70420300e4..659c67c0d3 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -457,7 +457,7 @@ class Model(object): def _get_FIELD_filename(self, field): if getattr(self, field.attname): # value is not blank - return os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname)) + return os.path.normpath(os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname))) return '' def _get_FIELD_url(self, field):