2👍
Calling the save
method on a FileField
will trigger it’s model’s save
method by default. You can bypass it by providing an additional third argument to the FileField
‘s save
method.
self.subtitles.save(filenameToSave, ContentFile("WEBVTT\n\n" + m), False)
Have a look at:
Source:stackexchange.com