dev_manage.py 文件源码

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

项目:rotest 作者: gregoil 项目源码 文件源码
def main():
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "all_settings")

    # Load django models. This is needed to populate the DB before using it.
    django.setup()
    if platform.system() == 'Windows':
        try:
            import win32file
            win32file._setmaxstdio(2048)

        except ImportError:
            print "Cannot find package 'win32file'. Installing it is "\
                "recommended before running the UT " \
                "(you can do so using 'pip install pypiwin32')"

    from django.core.management import execute_from_command_line
    execute_from_command_line(sys.argv)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号