fabfile.py 文件源码

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

项目:radar 作者: renalreg 项目源码 文件源码
def demo():
    answer = prompt('Are you sure you want to DELETE ALL DATA on "{0}" and replace it with demo data? (type "I am sure" to continue):'.format(env.host_string))

    if answer != 'I am sure':
        abort('Aborted!')

    password = None

    while not password:
        password = prompt('Choose a password:')

    with temp():
        put('radar.sql', 'radar.sql')
        run_db('drop')
        run_db('create')
        run_db('restore radar.sql')  # Note: user must be a PostgreSQL superuser to run this
        run_fixtures('users --password {0}'.format(password))
        run_fixtures('patients --patients 95 --no-data')
        run_fixtures('patients --patients 5 --data')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号