startapp with manage.py to create app in another directory

前端 未结 6 893
谎友^
谎友^ 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 14:50

    The simplest way I found is to go inside the server folder and create an __init__.py file:

    touch __init__.py
    

    Then, create any app you want:

    django-admin startapp {{APP NAME}}
    

提交回复
热议问题