storage.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:django-cra-helper 作者: MasterKale 项目源码 文件源码
def __init__(self, location=None, base_url=None, file_permissions_mode=None,
                 directory_permissions_mode=None):
        self._file_path = ''
        self._file_name = ''

        if os.path.isfile(location):
            # Separate the path from the filename
            self._file_path, self._file_name = os.path.split(location)
        else:
            # This class won't work if `location` doesn't point to an actual file
            raise IOError('Path should point to an existing file')

        # Pass in the folder so this acts like a typical FileSystemStorage that needs a path
        super().__init__(
            self._file_path,
            base_url,
            file_permissions_mode,
            directory_permissions_mode
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号