Reputation: 18923
On a large-scale Django project, where should the homepage template and view exist within the project structure?
In its own app (ex: homepage app)?
Some other app (ex: accounts)?
At the project-level putting the template in a "templates" directory and the view somewhere?
Somewhere else?
Is there a most frequent answer to this question?
Definitions:
Assumption: project structure strategy is dependent on the size of the project.
Upvotes: 3
Views: 1141
Reputation: 7343
The best approach in my opinion implement everything as separate app because of code re-use. You can create app called "landing" with templates folder inside with nested "landing" directory what's how Django might find you templates automatically from GenericViews for example.
yourproject/
landing/
templates/
landing/
index.html
urls.py
models.py
views.py
Upvotes: 2