Django Custom File Storage system

后端 未结 3 1032
我寻月下人不归
我寻月下人不归 2021-02-08 17:38

I have a custom storage

import os
from django.core.files.storage import Storage


class AlwaysOverwriteFileSystemStorage(Storage):
    def get_available_name(sel         


        
3条回答
  •  [愿得一人]
    2021-02-08 18:19

    You can put it anywhere, but you should point the path to there in the settings.py

    You can put this storage.py file in the root folder (the one that has manage.py) and point the path as storage.AlwaysOverwriteFileSystemStorage

提交回复
热议问题