Reputation: 26538
I am developing a business directory website, and it has
I am currently at the design stage and someone suggested to separate the pages/functions into different apps, eg.
Is this the best practise in the Django community? Or what would you do?
Upvotes: 1
Views: 284
Reputation: 118458
No. These sound like different views within a single business app.
You definitely don't want a new app per DetailView, ListView, or SearchView. That would quickly become confusing...
Think of what the app structure actually does: it adds database database table prefixes (appname_), splits models.py
files and encourages its own views.py file and tests.py file.
The differences between the home, search_result, and listing views don't justify the above in my opinion.
If you want a directory/file structure that separates your distinct views, you could build a views
directory in your app which contains individual search_result.py
views... if they are long.
Upvotes: 5