user4208442
user4208442

Reputation:

multiple model files or multiple apps?

hello all i am building a project in django, and i am in doubt for some things and it would be great if you guys give me a good explanation about this issue.

i am planning to build a project which will work with DRF(Django Rest Framework) API. And the project is big so is it better: to separate models into subfolders: models.py /submodels models1.py models2.py

or to create multiple apps like : /Users /Campaigns /Billing /Statistics

Upvotes: 1

Views: 836

Answers (2)

Ricardo Oyarzun
Ricardo Oyarzun

Reputation: 71

I would suggest also the multiple apps approach (not doing submodels), i recently had experience with Django Rest Framework and its far easier keep everything separated by apps and define the views accordingly for the nested URLs.

Upvotes: 0

Nvan
Nvan

Reputation: 1146

I personnaly would have make multiple apps if the API you are making will be consume by multiple applications.

Otherwise you can just make different models, so your project will be easier to manage and deploy.

Upvotes: 1

Related Questions