

@classmethod
def reconfigure(cls, upload_to=None, storage=None):
    f = cls._meta.get_field('file')
    if storage:
        f.storage = storage
    if upload_to:
        f.upload_to = upload_to
        if callable(upload_to):
            f.generate_filename = upload_to

dataset/ETHPy150Open feincms/feincms/feincms/module/medialibrary/models.py MediaFileBase.reconfigure/original