Ticket #7156: model_getfilename_win.diff

File model_getfilename_win.diff, 516 bytes (added by fcaprioli@…, 7 years ago)
  • base.py

     
    433433
    434434    def _get_FIELD_filename(self, field):
    435435        if getattr(self, field.attname): # value is not blank
    436             return os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname))
     436            return os.path.normpath(os.path.join(settings.MEDIA_ROOT, getattr(self, field.attname)))
    437437        return ''
    438438
    439439    def _get_FIELD_url(self, field):
Back to Top