When to create a new app (with startapp) in Django?

前端 未结 8 1999
余生分开走
余生分开走 2020-12-12 15:44

I\'ve googled around for this, but I still have trouble relating to what Django defines as \"apps\".

Should I create a new app for each piece of functionality in a

8条回答
  •  时光取名叫无心
    2020-12-12 16:25

    The rule I follow is it should be a new app if I want to reuse the functionality in a different project.

    If it needs deep understanding of the models in your project, it's probably more cohesive to stick it with the models.

提交回复
热议问题