How do you divide your project into applications in Django?

前端 未结 2 1642
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-31 02:30

I am not really sure how to divide my Django projects into applications.

What things should I consider when laying out a Django project?

2条回答
  •  囚心锁ツ
    2020-12-31 03:29

    I can understand why you have such doubt, Django's documentation about the application concept isn't very clear when it comes to how to organize a database / ER model into specific apps.

    Let's say you're building an API using Django and DRF and your ER diagram has many FKs and you're not sure how apps really work. In that case, I suggest you to organize the API code into a single app.

提交回复
热议问题