This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.files import File | |
from django.core.files.storage import default_storage, FileSystemStorage | |
from django.conf import settings | |
from django.core.files.base import ContentFile | |
local_storage = FileSystemStorage() | |
local_storage.base_location = settings.MEDIA_ROOT | |
def get_local_file_from_object(obj): |