staticfiles.py 文件源码

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

项目:openwisp-utils 作者: openwisp 项目源码 文件源码
def __init__(self, app_names=None, *args, **kwargs):
        self.locations = []
        self.storages = collections.OrderedDict()
        for dependency in self.dependencies:
            module = __import__(dependency)
            path = '{0}/static'.format(os.path.dirname(module.__file__))
            self.locations.append(('', path))
        for prefix, root in self.locations:
            filesystem_storage = FileSystemStorage(location=root)
            filesystem_storage.prefix = prefix
            self.storages[root] = filesystem_storage
        super(FileSystemFinder, self).__init__(*args, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号