I am developing a business directory website, and it has
- Home page
- Search Result page
- Listing page
I am currently at the design stage and someone suggested to separate the pages/functions into different apps, eg.
- home
- search_result
- listing
Is this the best practise in the Django community? Or what would you do?
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.pyfiles 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
viewsdirectory in your app which contains individualsearch_result.pyviews… if they are long.