Cannot start any django app

前端 未结 14 1804
离开以前
离开以前 2021-01-02 06:22

I am a newbie at Django and everytime I try to run python panel/manage.py startapp %app% (panel is my project) it gives me the error:

Error: \'         


        
14条回答
  •  半阙折子戏
    2021-01-02 06:55

    I was confused as well, until I realized that a Django project is a container for applications; this sequence makes it a bit clearer:

    # first create a Project (container).
    django-admin.py startproject Project
    
    # create multiple apps
    cd Project
    python manage.py startapp polls
    python manage.py startapp hello
    ...
    

提交回复
热议问题