Ticket #11228: file.py.diff

File file.py.diff, 676 bytes (added by Hersonls, 15 years ago)

Fix the patch

  • django/db/models/fields/files.py

     
    138138        # be restored later, by FileDescriptor below.
    139139        return {'name': self.name, 'closed': False, '_committed': True, '_file': None}
    140140
     141    def is_exists(self):
     142        """
     143        Verify if file exists on the file system and return True if exists.
     144        """
     145        return os.path.exists(self._get_path())
     146
    141147class FileDescriptor(object):
    142148    """
    143149    The descriptor for the file attribute on the model instance. Returns a
Back to Top