MCPcopy
hub / github.com/django-cms/django-filer / save

Method save

filer/models/filemodels.py:286–299  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

284 self.file.seek(0)
285
286 def save(self, *args, **kwargs):
287 # check if this is a subclass of "File" or not and set
288 # _file_type_plugin_name
289 if self.__class__ == File:
290 # what should we do now?
291 # maybe this has a subclass, but is being saved as a File instance
292 # anyway. do we need to go check all possible subclasses?
293 pass
294 elif issubclass(self.__class__, File):
295 self._file_type_plugin_name = self.__class__.__name__
296 if self._old_is_public != self.is_public and self.pk:
297 self._move_file()
298 self._old_is_public = self.is_public
299 super().save(*args, **kwargs)
300 save.alters_data = True
301
302 def delete(self, *args, **kwargs):

Callers 15

guess_mimetypesFunction · 0.45
append_fileMethod · 0.45
move_file_to_clipboardFunction · 0.45
move_files_to_folderFunction · 0.45
_move_fileMethod · 0.45
_copy_fileMethod · 0.45
image_dimensionsMethod · 0.45
save_formMethod · 0.45
set_filesMethod · 0.45
_rename_fileMethod · 0.45
_copy_fileMethod · 0.45
_copy_folderMethod · 0.45

Calls 1

_move_fileMethod · 0.95