bootstrap.py 文件源码

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

项目:django-hats 作者: GenePeeks 项目源码 文件源码
def load():
        # Dynamically grab package name
        package_name = os.path.dirname(__file__)

        # For each registered app, import all of the available roles
        for app in settings.INSTALLED_APPS:
            # Make sure the app is not self
            if app is not package_name:
                try:
                    import_module('.roles', app)
                except ImportError:
                    pass

    # Registers a Role with the global Bootstrapper if it is not already registered.
    # Returns the True if Role is added, None if it already exists
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号