Ticket #15590: filefield-path-set.diff

File filefield-path-set.diff, 592 bytes (added by Simon Litchfield, 14 years ago)
  • db/models/fields/files.py

     
    6363    def _get_path(self):
    6464        self._require_file()
    6565        return self.storage.path(self.name)
    66     path = property(_get_path)
    6766
     67    def _set_path(self, path):
     68        self.__init__(self.instance, self.field, path)
     69
     70    path = property(_get_path, _set_path, _del_file)
     71
    6872    def _get_url(self):
    6973        self._require_file()
    7074        return self.storage.url(self.name)
Back to Top