api.py 文件源码

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

项目:django-sysinfo 作者: saxix 项目源码 文件源码
def get_project(**kwargs):
    project = OrderedDict()
    project["current_dir"] = os.path.realpath(os.curdir)
    project["tempdir"] = tempfile.gettempdir()

    if config.MEDIA_ROOT:
        project["MEDIA_ROOT"] = OrderedDict([("path", settings.MEDIA_ROOT),
                                             ("disk", get_device_info(settings.MEDIA_ROOT))])

    if config.STATIC_ROOT:
        project["STATIC_ROOT"] = OrderedDict([("path", settings.STATIC_ROOT),
                                              ("disk", get_device_info(settings.STATIC_ROOT))])

    if config.CACHES:
        project["CACHES"] = get_caches_info()

    if config.installed_apps:
        project["installed_apps"] = get_installed_apps()
    if config.mail:
        project["mail"] = get_mail(**kwargs)
    return project
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号