在Djang启动新项目时出错

2024-09-30 23:36:38 发布

您现在位置:Python中文网/ 问答频道 /正文

所以我要从Django开始。我安装了python,当我在CMD中运行python时,它运行得很好。接下来,我下载并安装了Django,进入python shell,导入Django并成功输出其版本。最后,我为我的项目创建了一个新目录,输入:

django公司-管理员.pystartproject我的网站

我得到了以下错误:

Type 'django-admin.py help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    makemessages
    makemigrations
    migrate
    runserver
    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver
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.).

我在Django的装置里做错什么了吗?你知道吗


Tags: 项目django版本目录cmdsettings管理员not