Agos
Agos

Reputation: 19440

Should I split a big Django project into many apps?

Short version:
I have a Django project under development & testing (not yet into production) which is slowly getting “not-so-small”, and lately I've been wondering about splitting things up to keep it manageable.

Project layout:
The project comprises various reusable applications not developed by me, such as avatar, django_evolution, compressor, and a bigger -monolithic, I'd say- app developed by me which contains the main functionality of the site. The views file is reaching 1k lines and there are 12 models, but the functionalities are almost all in place (i.e. I'm not expecting them to grow 10x).

The doubt:
A distinction of the models and the views into three “groups” could be made leading to a separation into three apps, but:

Finally, my question:
Can I get any advantage by splitting my app?
If it's only for readability and maintainability of the “big” files, I could just split those files and put them in a folder (as many related questions' answers suggest).

Upvotes: 8

Views: 1058

Answers (1)

Felix Kling
Felix Kling

Reputation: 816424

You don't have to split up your application into several apps if it doesn't make sense. But you can group your view functions into different view files. This would be a first step. There is no need to put all of them in one place.

Upvotes: 5

Related Questions