startapp with manage.py to create app in another directory

前端 未结 6 937
谎友^
谎友^ 2021-01-31 14:25

My Django project structure is:

/proj
  /frontend
  /server
    /proj
    /app1
    /app2
  manage.py

How do I run python ma

6条回答
  •  青春惊慌失措
    2021-01-31 15:12

    If you are already in the server directory, then you can run

    python ../manage.py startapp appname
    

    And appname will be created in the server directory instead of in the project root.

提交回复
热议问题