美文网首页
Django初始化项目出错

Django初始化项目出错

作者: Richard_Oldman | 来源:发表于2018-06-12 15:10 被阅读0次

    django-admin.py startproject my_proj .

    Windows下执行Django时创建项目出错,报错如下:

    Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.).

    Google后,得到解决方法。

    使用

    django-admin startproject my_proj .

    即django-admin去掉.py三个字符,就可以创建成功。

    出处:

    https://stackoverflow.com/questions/25664654/issues-in-initial-setup-for-django-project?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

    相关文章

      网友评论

          本文标题:Django初始化项目出错

          本文链接:https://www.haomeiwen.com/subject/ybzleftx.html