manage.py 文件源码

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

项目:yawn 作者: aclowes 项目源码 文件源码
def main():
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "yawn.settings.debug")

    # check if yawn is in installed apps, and bail if it is not
    if 'yawn' not in settings.INSTALLED_APPS:
        print("Please check your DJANGO_SETTINGS_MODULE environment variable.\n"
              "Make sure 'yawn' is in your INSTALLED_APPS.\n"
              "Generally, your settings file should start with 'from yawn.settings.base import *'")
        sys.exit(1)

    print('YAWN workflow management tool')
    if os.environ['DJANGO_SETTINGS_MODULE'] == 'yawn.settings.debug':
        print('  Running in DEBUG mode')

    # run the django manage.py command line
    execute_from_command_line(sys.argv)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号