database.py 文件源码

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

项目:python3-qoqa 作者: ebsuku 项目源码 文件源码
def development_postgresql():
    """
    Setup development configurations for postgresql database
    """
    host = input(Fore.GREEN + 'Database Host: ')
    name = input(Fore.GREEN + 'Database Name: ')
    port = input(Fore.GREEN + 'Database Port: ')
    user = input(Fore.GREEN + 'Database User: ')
    password = input(Fore.GREEN + "Database Password: ")
    if '' in [host, name, user, password, port]:
        print(Fore.RED + "Please enter all database details")
        development_postgresql()
    else:
        qoqa.INIT_PROJECT_CONFIG['DEV_DB'] = {
            'DATABASE': 'postgresql',
            'HOST': host,
            'NAME': name,
            'USER': user,
            'PASSWORD': password,
            'PORT': port,
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号