Cannot start any django app

前端 未结 14 1814
离开以前
离开以前 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 07:09

    if you want to make an empty directory that will contain your new app

    project-dir
        └── blog
            ├── __init__.py
            ├── ...
            ├── blog-ext #this empty dir that will contain the new app
            └── views.py
    

    so instead of typing :

    python manage.py newapp blog/blog-ext
    

    it should be :

    django-admin startapp newapp blog/blog-ext
    

提交回复
热议问题